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.

Files for async-mgun, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size async_mgun-0.1.3-py2-none-any.whl (4.8 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page