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

If you're not sure about the file name format, learn more about wheel file names.

iw.recipe.fetcher-0.1dev_r6544-py2.4.egg (9.6 kB view details)

Uploaded Egg

File details

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

File metadata

File hashes

Hashes for iw.recipe.fetcher-0.1dev_r6544-py2.4.egg
Algorithm Hash digest
SHA256 e1a8de357c60b77ab996af1349ba7b9bf542131be177658d70d7cbdbc44c3010
MD5 7d7a9723bd3e65b1ec3f1b9e718ddc7b
BLAKE2b-256 6ff16acf7ac1395eb31a348fd0b6484df447285958506f388e3b07ebdcf9dcad

See more details on using hashes here.

Supported by

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