ZC buildout recipe to fetch urls
Project description
What is iw.recipe.fetcher ?
Download an url to a local directory.
How to use iw.recipe.fetcher ?
We need some buildout vars:
>>> data_dir = join(test_dir, 'data') >>> buildout = {'instance': {'location': test_dir}, ... 'buildout': {'directory': test_dir, ... 'install-from-cache': 'false', ... 'download-cache':'false', ... }} >>> name = 'utilities'
Now we can fetch some urls:
>>> options = { ... 'urls':'http://garr.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe', ... 'base_url':'http://switch.dl.sourceforge.net/sourceforge', ... 'files':''' ... pyodbc/pyodbc-2.0.39.win32-py2.4.zip ... '''} >>> from iw.recipe.fetcher import Recipe >>> recipe = Recipe(buildout, name, options) >>> recipe.install()
It works:
>>> ls(os.path.join(test_dir, name)) MinGW-5.1.3.exe pyodbc-2.0.39.win32-py2.4.zip
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for iw.recipe.fetcher-0.1dev_r6548-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25aebe7e0fd5c48de483e91f83b4c8f6f10b63b359e5743538e4454df193cad |
|
MD5 | 0a0a6843df6a9bd43f4ee2e7f2566fd9 |
|
BLAKE2b-256 | 415373fd4e411ef1031dcd07586bd086094152bad13925623e16ef0a3bb1f8e7 |