Skip to main content

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)

Uploaded Source

Built Distribution

async_fetcher-0.2.2-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

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