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.1.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for async_fetcher-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae65b31de4a678b481afef3dddb03b5a9e3637474a634ccc68c2f65dd845b8d8 |
|
MD5 | 9001ccbaee83413776ab4dd1fc5157db |
|
BLAKE2b-256 | 0886123779d0a3b32701403afaab6616c371a723f23fc1e4b9e7773fc1e01be9 |