def __init__(self, descriptor={}, base_path=None, strict=False, storage=None,<EOL>package=None, **options):
<EOL>if base_path is None:<EOL><INDENT>base_path = helpers.get_descriptor_base_path(descriptor)<EOL><DEDENT>if storage and not isinstance(storage, Storage):<EOL><INDENT>storage = Storage.connect(storage, **options)<EOL><DEDENT>descriptor = helpers.retrieve_descriptor(descriptor)<EOL>descriptor = helpers.dereference_resource_descriptor(descriptor, base_path)<EOL>if descriptor.get('<STR_LIT:url>'):<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>UserWarning)<EOL>descriptor['<STR_LIT:path>'] = descriptor['<STR_LIT:url>']<EOL>del descriptor['<STR_LIT:url>']<EOL><DEDENT>self.__current_descriptor = deepcopy(descriptor)<EOL>self.__next_descriptor = deepcopy(descriptor)<EOL>self.__base_path = base_path<EOL>self.__package = package<EOL>self.__storage = storage<EOL>self.__relations = None<EOL>self.__strict = strict<EOL>self.__table = None<EOL>self.__errors = []<EOL>self.__table_options = options<EOL>self.__build()<EOL>
https://github.com/frictionlessdata/datapackage-py#resource