asyncio-compatible HTTP2 client for Python based on reqwest
Rust crate and pyo3/pyo3-asyncio
pip install async-http2
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()
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.