Infer default credential providers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start in obstore/python/obstore/store.py at from_url and inspect _parse_scheme plus the available synchronous and asynchronous credential providers. Check how the existing S3, GCS, and Azure paths handle an omitted credential_provider. Done means the two opt-in keywords select the matching vendor provider without changing behavior when omitted, while explicit providers continue to take precedence.
Written by the indexing model from the issue text.
Description
I'm thinking something like this in store.py:
(Not sure if all these exist credential providers exist in obstore, but assume that when called with no arguments that these return the vendor's default credential.)
def from_url(...): ... scheme = _parse_scheme(url) vendor_default_credential_providers = { "s3": S3CredentialProvider, "gcs": GoogleCredentialProvider, "azure": AzureCredentialProvider, } vendor_default_async_credential_providers = { "s3": S3AsyncCredentialProvider, "gcs": GoogleAsyncCredentialProvider, "azure": AzureAsyncCredentialProvider, } if credential_provider is None and vendor_default_credential_provider: if credential_provider := vendor_default_credential_providers.get(scheme): credential_provider = credential_provider() elif credential_provider is None and vendor_default_async_credential_provider: if credential_provider := vendor_default_async_credential_providers.get(scheme): credential_provider = credential_provider() if scheme == "s3": ...Implications:
- Existing behaviour of
from_urlis unchanged when new keywords are omitted.- Two new keywords added to
from_url:vendor_default_credential_providerandvendor_default_async_credential_provider. These allow the user to opt into using an automatically selected vendor default credential provider, and allow the user to specify whether they want it to be synchronous or asynchronous.- If one of the new keywords is specified, and
credential_provideris not explicitly specified, then the appropriate vendor default credential provider will be used.- There is a one to one mapping from scheme to default vendor credential providers. Users must still explicitly specify if they need credential providers other than the vendor default credential provider.
Originally posted by @daviewales in #267
- Dominant language
- Python
- Stars
- 842
- Forks
- 50
- Avg merge
- 9h
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/obstore
-
fsspec: `get_file` silently writes nothing for `file://` and Windows pathsPossibly taken @andyhetianjun claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
developmentseed/obstore#830 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
developmentseed/obstore#823 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/obstore#819 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
developmentseed/obstore#816 · 3 comments ·
Maintainers usually reply within 1 day
-
`put_async(Path)` opens files synchronously while holding the GILPossibly taken @kylebarron claimed this 14 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/obstore#809 · 1 comment ·
Maintainers usually reply within 1 day
All issues in developmentseed/obstore
Similar issues
-
00 - Bug component: numpy.linalg
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
521xueweihan/HelloGitHub#4543 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
emeryberger/CSrankings#15700 ·
Maintainers usually reply within 2 days
-
Bug | 工作不正常 Triage | 待检查
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
Maintainers usually reply within 1 day
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day