Skip to main content

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


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

iw.recipe.fetcher-0.1dev_r6546-py2.4.egg (9.7 kB view details)

Uploaded Source

File details

Details for the file iw.recipe.fetcher-0.1dev_r6546-py2.4.egg.

File metadata

File hashes

Hashes for iw.recipe.fetcher-0.1dev_r6546-py2.4.egg
Algorithm Hash digest
SHA256 2cfc83299ddeeadbc9a55692fd07d1245f2a6f7cd02915c34440aa0012459d0b
MD5 787d7e105ecd8050faec9d6543ae2a3a
BLAKE2b-256 89d3e7878c4b776a7e55c884a974aeb3c48353250855892453da97d83c150587

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page