boettiger-lab / earthdatalogin

Making public access of public data a bit easier
https://boettiger-lab.github.io/earthdatalogin/
Other
22 stars 4 forks source link

adds support for netrc-based authentication #5

Closed cboettig closed 6 months ago

cboettig commented 6 months ago

@yuvipanda I'm still going to test this more but I think this basically works now. I should also be able to benchmark the functions more directly on and off AWS platform as well, and I'll add those results somewhere once I do.

I've revised the README so that the recommended method is edl_netrc(). Functions for the other authentication methods are still in here, but now using edl_set_token() or edl_s3_token() in interactive mode will result in a prompt asking if you want to use edl_netrc() instead:

> edl_set_token()
 Consider using edl_netrc() instead.
 edl_netrc() works everywhere, inside and outside `us-west-2`.

Use edl_netrc() instead? (Yes/no/cancel) 
configuring netrc-based auth instead as requested...

edl_netrc() is also now the default authentication method for edl_download() as well (which exists because HD4 files cannot be accessed with range requests).