Skip to content

asyncio compatible HTTP2 client for Python based on `reqwest` Rust crate and pyo3/pyo3-asyncio

License

Notifications You must be signed in to change notification settings

alekseyl1992/async_http2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-http2

GitHub Actions PyPI

asyncio-compatible HTTP2 client for Python based on reqwest Rust crate and pyo3/pyo3-asyncio

Installation

pip install async-http2

Usage

import asyncio
import logging

from async_http2 import Client


def main():
    logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s')

    client = Client(timeout=60)

    loop = asyncio.get_event_loop()
    loop.run_until_complete(work(client))


async def work(client):
    resp_data = await client.get('http://localhost:1010', {
        'fast': '1',
    })
    logging.info(resp_data)


if __name__ == '__main__':
    main()

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

About

asyncio compatible HTTP2 client for Python based on `reqwest` Rust crate and pyo3/pyo3-asyncio

Resources

License

Stars

Watchers

Forks

Packages

No packages published