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')
>>> parts_dir = join(data_dir, 'parts')
>>> buildout = {'instance': {'location': test_dir},
...             'buildout': {'directory': test_dir,
...             'install-from-cache': 'false',
...             'download-cache':'false',
...             'parts-directory': parts_dir}}
>>> name = 'utilities'

Now we can fetch some urls:

>>> options = {
...   'urls':'http://garr.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe'}
>>> from iw.recipe.fetcher import Recipe
>>> recipe = Recipe(buildout, name, options)
>>> recipe.install()

It works:

>>> ls(os.path.join(parts_dir, name))
MinGW-...exe

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_r6545-py2.4.egg (9.6 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for iw.recipe.fetcher-0.1dev_r6545-py2.4.egg
Algorithm Hash digest
SHA256 42a13a30b2b7777277bd7065d30286ea313d75e7370b823cbcf02c4207ad0ace
MD5 5359169f17d94df1f07abf4ffff362af
BLAKE2b-256 02a5f38e2721ce6e50bf713bc3e52cde722945606c2ed1a015580672434c709d

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