Metadata-Version: 2.0
Name: async-fetcher
Version: 0.2.1
Summary: aiohttp wrapper to handle multiple api calls at a time
Home-page: https://github.com/night-crawler/async-fetcher
Author: night-crawler
Author-email: lilo.panic@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: License :: OSI Approved :: MIT License
Requires: aiohttp
Requires: furl

Installation
------------
.. code:: bash

    pip install -e git+https://github.com/night-crawler/async-fetcher.git@#egg=async-fetcher


Sample
------

.. code:: python

    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()

.. code:: python

    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()


