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

Allow custom download URLs for individual files #30

Merged
merged 1 commit into from
Oct 26, 2018
Merged

Conversation

leouieda
Copy link
Member

Custom URLs are specified by the new urls optional argument for
pooch.create and pooch.Pooch. It is a dictionary matching file names
to download URLs. If a file is in Pooch.urls, it will be downloaded
from there instead of the base_url. Custom URLs can be loaded from
registry files as well by appending the URL to the end of a line.

This will be useful if your project downloads data from a remote source
that you don't control. Otherwise, the only choice would be to duplicate
the data in your repository (which would be bad if the files are large).

Fixes #4

Custom URLs are specified by the new `urls` optional argument for
`pooch.create` and `pooch.Pooch`. It is a dictionary matching file names
to download URLs. If a file is in `Pooch.urls`, it will be downloaded
from there instead of the `base_url`. Custom URLs can be loaded from
registry files as well by appending the URL to the end of a line.

This will be useful if your project downloads data from a remote source
that you don't control. Otherwise, the only choice would be to duplicate
the data in your repository (which would be bad if the files are large).

Fixes #4
@leouieda leouieda requested review from jrleeman and removed request for jrleeman October 26, 2018 03:27
@leouieda leouieda merged commit ffe3f9b into master Oct 26, 2018
@leouieda leouieda deleted the custom-urls branch October 26, 2018 23:19
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

Successfully merging this pull request may close these issues.

None yet

1 participant