Earthdata access via obstore #969
kylebarron
started this conversation in
General
Replies: 1 comment 6 replies
-
|
This integration would be great to have! and the refresheable tokens has been on TODO for a long time. I'll take a look at the
Thanks for connecting the dots @kylebarron! |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
👋 Hi all,
I've been working on obstore lately. It's a fast, easy-to-use, async-capable interface for S3, GCS, and Azure storage, with a single API to access each.
As of obstore v0.5, it has the concept of "credential providers", which are Python callbacks that customize credentials for a store. Obstore v0.5 ships with a
NasaEarthdataCredentialProvider, which allows users to get in-region direct S3 access to Earthdata in a few lines of code:If you're curious you can look at the implementation.
Aside from being really simple to use, this also provides automatic token refresh. Even if the end user has code that runs for longer than an hour, the end user never needs to think about tokens or when they expire. Obstore will automatically refresh credentials when making requests.
If I'm reading this correctly,
get_fsspec_https_sessionand similar APIs will not automatically refresh tokens.This discussion is primarily to make the
earthaccesscommunity aware of this obstore integration. There's also a couple things we could add on the obstore side to simplify usage; I see this library also supports netrc and env var support, and we could add that behavior to obstore as well.Any feedback is welcome!
Beta Was this translation helpful? Give feedback.
All reactions