def __init__(self, descriptor=None, base_path=None, strict=False, storage=None,<EOL>schema=None, default_base_path=None, **options):
<EOL>if schema is not None:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>UserWarning)<EOL>if isinstance(schema, six.string_types):<EOL><INDENT>if schema in ['<STR_LIT>', '<STR_LIT:default>']:<EOL><INDENT>schema = '<STR_LIT>'<EOL><DEDENT>elif schema == '<STR_LIT>':<EOL><INDENT>schema = '<STR_LIT>'<EOL><DEDENT>elif schema == '<STR_LIT>':<EOL><INDENT>schema = '<STR_LIT>'<EOL><DEDENT>descriptor['<STR_LIT>'] = schema<EOL><DEDENT><DEDENT>if default_base_path is not None:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>UserWarning)<EOL>base_path = default_base_path<EOL><DEDENT>tempdir, descriptor = _extract_zip_if_possible(descriptor)<EOL>if tempdir:<EOL><INDENT>self.__tempdir = tempdir<EOL><DEDENT>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>if storage and not descriptor:<EOL><INDENT>descriptor = {'<STR_LIT>': []}<EOL>for bucket in storage.buckets:<EOL><INDENT>descriptor['<STR_LIT>'].append({'<STR_LIT:path>': bucket})<EOL><DEDENT><DEDENT>descriptor = helpers.retrieve_descriptor(descriptor)<EOL>descriptor = helpers.dereference_package_descriptor(descriptor, base_path)<EOL>for resource in descriptor.get('<STR_LIT>', []):<EOL><INDENT>url = resource.pop('<STR_LIT:url>', None)<EOL>if url is not None:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>UserWarning)<EOL>resource['<STR_LIT:path>'] = [url]<EOL><DEDENT><DEDENT>self.__current_descriptor = deepcopy(descriptor)<EOL>self.__next_descriptor = deepcopy(descriptor)<EOL>self.__base_path = base_path<EOL>self.__storage = storage<EOL>self.__strict = strict<EOL>self.__resources = []<EOL>self.__errors = []<EOL>self.__build()<EOL>
https://github.com/frictionlessdata/datapackage-py#package