We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I would like to be able to set the region using url parameters, like in the example below:
fs = open_fs('s3://testbucket?endpoint_url=localhost:9000®ion=us-east-1')
But S3FSOpener in opener.py doest not get it
class S3FSOpener(Opener): protocols = ["s3"] def open_fs(self, fs_url, parse_result, writeable, create, cwd): bucket_name, _, dir_path = parse_result.resource.partition("/") if not bucket_name: raise OpenerError("invalid bucket name in '{}'".format(fs_url)) strict = ( parse_result.params["strict"] == "1" if "strict" in parse_result.params else True ) s3fs = S3FS( bucket_name, dir_path=dir_path or "/", aws_access_key_id=parse_result.username or None, aws_secret_access_key=parse_result.password or None, endpoint_url=parse_result.params.get("endpoint_url", None), acl=parse_result.params.get("acl", None), cache_control=parse_result.params.get("cache_control", None), strict=strict, ) return s3fs
The change to make it working is very simple
class S3FSOpener(Opener): protocols = ["s3"] def open_fs(self, fs_url, parse_result, writeable, create, cwd): bucket_name, _, dir_path = parse_result.resource.partition("/") if not bucket_name: raise OpenerError("invalid bucket name in '{}'".format(fs_url)) strict = ( parse_result.params["strict"] == "1" if "strict" in parse_result.params else True ) s3fs = S3FS( bucket_name, dir_path=dir_path or "/", aws_access_key_id=parse_result.username or None, aws_secret_access_key=parse_result.password or None, endpoint_url=parse_result.params.get("endpoint_url", None), # line to add region=parse_result.params.get("region", None), acl=parse_result.params.get("acl", None), cache_control=parse_result.params.get("cache_control", None), strict=strict, ) return s3fs
Could you manage this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I would like to be able to set the region using url parameters, like in the example below:
But S3FSOpener in opener.py doest not get it
The change to make it working is very simple
Could you manage this?
The text was updated successfully, but these errors were encountered: