code: def add_resource(self, descriptor):
          
          self.__current_descriptor.setdefault('resources', [])
          self.__current_descriptor['resources'].append(descriptor)
          self.__build()
          return self.__resources[-1]
docs: https://github.com/frictionlessdata/datapackage-py#package