def __init__(self, s3fs: S3FileSystem, url: str=None, public=False, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, parallel=25, endpoint_url=None, aws_region=None):
    self.s3fs = s3fs
    self.root = {}
    self.url = url
    self.public = public
    self.parallel = parallel
    self.aws_region = aws_region
    self.endpoint_url = endpoint_url
    self.bucket = url.split('/')[2]
    self.path = '/'.join(url.split('/')[3:])
    if (self.bucket == 's3:'):
        self.bucket = url.split('/')[4]
        self.path = '/'.join(url.split('/')[5:])
    self.bucketpath = posixpath.join(self.bucket, self.path)
    self.protocol = 'object'
    client_config = botocore.config.Config(max_pool_connections=parallel)
    self.client = boto3.client('s3', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=client_config, endpoint_url=endpoint_url, region_name=aws_region)
    self.resource = boto3.resource('s3', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=client_config, endpoint_url=endpoint_url, region_name=aws_region)
def __init__(self, s3fs: S3FileSystem, url: str=None, public=False, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, parallel=25, endpoint_url=None, aws_region=None):
    self.s3fs = s3fs
    self.root = {}
    self.url = url
    self.public = public
    self.parallel = parallel
    self.aws_region = aws_region
    self.endpoint_url = endpoint_url
    self.bucket = url.split('/')[2]
    self.path = '/'.join(url.split('/')[3:])
    if (self.bucket == 's3:'):
        self.bucket = url.split('/')[4]
        self.path = '/'.join(url.split('/')[5:])
    self.bucketpath = posixpath.join(self.bucket, self.path)
    self.protocol = 'object'
    client_config = botocore.config.Config(max_pool_connections=parallel)
    self.client = boto3.client('s3', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=client_config, endpoint_url=endpoint_url, region_name=aws_region)
    self.resource = boto3.resource('s3', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=client_config, endpoint_url=endpoint_url, region_name=aws_region)