/aiorequests

requests wrapper for asyncio

Primary LanguagePython

aiorequests

requests wrapper for asyncio (based on run_in_executor).

Reasons

  • aiohttp have no https proxy support.

License

aiorequests is offered under the WTFPL license.

Features

Usage

import asyncio

import aiorequests


async def yoba():
    r = await aiorequests.get("https://google.com")
    print(r.status_code)
    print(len(r.content))


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    aiorequests.set_async_requests(loop=loop)
    loop.run_until_complete(yoba())