aiohttp wrapper to handle multiple api calls at a time
Project description
Installation
pip install -e git+https://github.com/night-crawler/async-fetcher.git@#egg=async-fetcher
Sample
af = AsyncFetch({
'first': AsyncFetch.mk_task(build_url('request-info')),
'second': AsyncFetch.mk_task('http://example.com/'),
'fail': AsyncFetch.mk_task(build_url('404'))
})
responses = af.go()
af0 = AsyncFetch({})
tcp_connector = af0.get_tcp_connector()
af1 = AsyncFetch({
'1': AsyncFetch.mk_task(build_url('request-info')),
'2': AsyncFetch.mk_task(build_url('request-info')),
}, tcp_connector=tcp_connector)
responses = af1.go()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async-fetcher-0.2.2.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for async_fetcher-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad9f3453804cd1da85d8dccf9664dd2d7ab398196ac5511c60f1b7e7320d28c6 |
|
MD5 | b68bc978e1600b59649c13881e3584c9 |
|
BLAKE2b-256 | 45b308e2caf049859cb86cc70c89ab64207244dc56fd42cb5a34007f122d14e1 |