Skip to main content

HTTP REST Client based on aiohttp with dynamic url building

Project description

https://badge.fury.io/py/async-mgun.svg https://travis-ci.org/maximdanilchenko/async-mgun.svg https://codecov.io/gh/maximdanilchenko/async-mgun/branch/master/graph/badge.svg

HTTP REST Client based on aiohttp with dynamic url building. Useful for microservices non-blocking communication

Quickstart

from mgun import HttpClient
import asyncio

client = HttpClient('https://httpbin.org')


async def request():
    resp = await client.anything.api.users[23].address.get({'q': '12'})

    print(resp.status)  # 200
    print(resp.data['url'])  # https://httpbin.org/anything/api/users/23/address?q=12

loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([request()]))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

async_mgun-0.1.3-py2-none-any.whl (4.8 kB view hashes)

Uploaded Python 2

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