digia / aiohttp

http client/server for asyncio (PEP-3156)

Home Page:http://aiohttp.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http client/server for asyncio

aiohttp logo

image

image

image

Features

  • Supports both client and server side of HTTP protocol.
  • Supports both client and server Web-Sockets out-of-the-box.
  • Web-server has middlewares and pluggable routing.

Getting started

Client

To retrieve something from the web:

Server

This is simple usage example:

Note: examples are written for Python 3.5+ and utilize PEP-492 aka async/await. If you are using Python 3.4 please replace await with yield from and async def with @coroutine e.g.:

async def coro(...):
    ret = await f()

should be replaced by:

@asyncio.coroutine
def coro(...):
    ret = yield from f()

Documentation

https://aiohttp.readthedocs.io/

Discussion list

aio-libs google group: https://groups.google.com/forum/#!forum/aio-libs

Requirements

Optionally you may install the cChardet library.

License

aiohttp is offered under the Apache 2 license.

Source code

The latest developer version is available in a github repository: https://github.com/KeepSafe/aiohttp

Benchmarks

If you are interested in by efficiency, AsyncIO community maintains a list of benchmarks on the official wiki: https://github.com/python/asyncio/wiki/Benchmarks

About

http client/server for asyncio (PEP-3156)

http://aiohttp.readthedocs.io

License:Apache License 2.0


Languages

Language:Python 98.9%Language:HTML 0.5%Language:Makefile 0.3%Language:Shell 0.2%Language:Batchfile 0.1%Language:PLpgSQL 0.1%Language:CSS 0.0%