Skip to content
New issue

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

Feature: Pass profile and endpoint_url #16

Open
garciampred opened this issue Feb 28, 2025 · 1 comment
Open

Feature: Pass profile and endpoint_url #16

garciampred opened this issue Feb 28, 2025 · 1 comment

Comments

@garciampred
Copy link

Hello. Thanks a lot for this package. I am looking for supporting optionally passing credentials (profile) and a different endpoint_url. Something like

zarrdump --profile contabo --endpoint https://eu2.contabostorage.com s3://somebucket/somezarr.zarr

So it gets the credentials from that profile from the ~/.aws folder. This can be passed in this line in dump itself

fs, _, _ = fsspec.get_fs_token_paths(url, storage_options=dict(profile=profile, endpoint_url=endpoint_url)

Are you OK if I do a PR with this?

@oliverwm1
Copy link
Owner

Sure, this seems useful. Only suggestion is to make it more general, since otherwise I expect we may have to keep adding more and more arguments which may be specific to only certain filesystem implementations.

Specifically:

zarrdump --storage_option profile=contabo --storage_option endpoint=https://eu2.contabostorage.com s3://somebucket/somezarr.zarr

which can then be made into the appropriate storage_options dict and passed to get_fs_token_paths as you suggest.

Alternatively we could do:

zarrdump --storage_options profile=contabo endpoint=https://eu2.contabostorage.com s3://somebucket/somezarr.zarr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants