Skip to main content

What is iw.recipe.fetcher ?

Download an url to a local directory.

How to use iw.recipe.fetcher ?

The recipe download from an http server:

>>> server_data = tmpdir('server_data')
>>> write(server_data, 'file1.txt', 'test1')
>>> write(server_data, 'file2.txt', 'test1')
>>> write(server_data, 'file3.txt', 'test1')

>>> server_url = start_server(server_data)

We need some buildout vars:

>>> write('buildout.cfg', '''
... [buildout]
... parts=test1
...
... [test1]
... recipe=iw.recipe.fetcher
... urls=
...       %(server_url)s/file1.txt
... base_url=%(server_url)s
... files=
...       file2.txt
...       file3.txt
... ''' % dict(server_url=server_url))

Now we can fetch some urls:

>>> print system(buildout)
Installing test1.
<BLANKLINE>

It works:

>>> ls(sample_buildout, 'test1')
- file1.txt
- file2.txt
- file3.txt


>>> write('buildout.cfg', '''
... [buildout]
... parts=test2
...
... [test2]
... recipe=iw.recipe.fetcher
... urls=
...   http://www.example.com/file1.txt
... find-links=%(server_url)s
... ''' % dict(server_url=server_url))

Now we can fetch some urls:

>>> print system(buildout)
Uninstalling test1.
Installing test2.
<BLANKLINE>

Release files for iw.recipe.fetcher 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iw.recipe.fetcher 0.2
File Size Uploaded
iw.recipe.fetcher-0.2.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iw.recipe.fetcher 0.2
File Interpreter ABI Platform
iw.recipe.fetcher-0.2-py2.4.egg Legacy Egg format - - Details

Total release size: 14.7 kB

Release files / iw.recipe.fetcher-0.2.tar.gz

Download URL iw.recipe.fetcher-0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
52487dfe3a9538712cf051c89c4c6bb8402a6685d2fbdf2efcac96cf2c2a6c7f
BLAKE2b-256 checksum
How to use checksums
e55a56fc2a12f01cc4bcbacbe99f3c62215d73ca22e0f47c697e84debcc5ee18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / iw.recipe.fetcher-0.2-py2.4.egg

Download URL iw.recipe.fetcher-0.2-py2.4.egg
Size 10.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
05de36a647efb5571fad8a1d970e84e0c835abbe58d3575ac70ca205d9ee6268
BLAKE2b-256 checksum
How to use checksums
fc6e3b2e8856512d73b241824c0a96259df7b88e886d12a705b39d46e418f290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page