Skip to content

RedC

Async HTTP for Python. Connections stay open. Your event loop stays free.

pip install redc

Quick start Client

One client, many requests

Keep one Client for the work you are doing. The next request to the same server reuses the connection, so it does not pay for a new handshake.

import asyncio
from redc import Client

async def main():
    async with Client(base_url="https://example.com") as client:
        response = await client.get("/get")
        response.raise_for_status()
        print(response.status_code, response.first_byte_time)

asyncio.run(main())

HTTP/3 is the default. If the server does not offer it, the request uses HTTP/2 or HTTP/1.1. Certificates are checked with trustifi.

Start

Install the wheel, then make one request.

Install
Quick start

Use it

The client, the request, the response.

Client
Requests
Response
URL
Streaming

Control the connection

TLS, the local address, proxies, sockets.

TLS
Connections
Errors