def add_resource(self, descriptor):
    'Add new resource to package.\n\n        Parameters:\n            descriptor (dict): resource descriptor\n\n        Returns:\n            Resource/None: added `Resource` instance or `None` if not added\n        '
    self.setdefault('resources', [])
    self['resources'].append(descriptor)
    return self.resources[(- 1)]
Add new resource to package.

Parameters:
    descriptor (dict): resource descriptor

Returns:
    Resource/None: added `Resource` instance or `None` if not added
def add_resource(self, descriptor):
    'Add new resource to package.\n\n        Parameters:\n            descriptor (dict): resource descriptor\n\n        Returns:\n            Resource/None: added `Resource` instance or `None` if not added\n        '
    self.setdefault('resources', [])
    self['resources'].append(descriptor)
    return self.resources[(- 1)]