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

Support URL mirrors in the Pooch class #310

Open
dstansby opened this issue Jun 23, 2022 · 2 comments
Open

Support URL mirrors in the Pooch class #310

dstansby opened this issue Jun 23, 2022 · 2 comments
Labels
enhancement Idea or request for a new feature

Comments

@dstansby
Copy link

Description of the desired feature:
It would be great to support data mirrors, ie. having values for base_url where the second, third etc. values can be used if the first URL isn't available.

Are you willing to help implement and maintain this feature?

Possibly

@dstansby dstansby added the enhancement Idea or request for a new feature label Jun 23, 2022
@leouieda
Copy link
Member

Hi @dstansby thanks for suggesting this! I can see why this would be a nice feature to have.

One way to implement this would be allow base_url to take a list/tuple/set and then put this part of pooch.Pooch.fetch in a for loop with try: ... except:... blocks:

stream_download(

I don't have a lot of time to implement this right now but would gladly review (or ask someone else to review) if you're willing to give this a try.

@leouieda leouieda changed the title Support URL mirrors Support URL mirrors in the Pooch class Jun 27, 2022
@leouieda
Copy link
Member

This would also be restricted to the Pooch class, at least for now. We can think about adding it to retrieve later is there is a desire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants