https://github.com/aymenjd/redc
High-performance, asynchronous HTTP client in Python, driven by libcurl
https://github.com/aymenjd/redc
curl http http-client libcurl python
Last synced: 5 months ago
JSON representation
High-performance, asynchronous HTTP client in Python, driven by libcurl
- Host: GitHub
- URL: https://github.com/aymenjd/redc
- Owner: AYMENJD
- License: mit
- Created: 2025-01-31T02:29:10.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T11:31:29.000Z (6 months ago)
- Last Synced: 2025-07-27T13:13:27.288Z (6 months ago)
- Topics: curl, http, http-client, libcurl, python
- Language: C++
- Homepage:
- Size: 165 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.org/project/RedC) [](https://curl.se/ch/8.15.0.html) [](https://pepy.tech/project/redc)
**RedC** is a **high-performance**, asynchronous **HTTP** client library for **Python**, built on top of the powerful **curl** library. It provides a simple and intuitive interface for making HTTP requests and handling responses
## Features
- **Asynchronous by Design**: Built with `asyncio` for non-blocking HTTP requests
- **HTTP/2 Support**: Fully compatible with `HTTP/2` for faster and more efficient communication
- **curl Backend**: Leverages the speed and reliability of curl for HTTP operations
- **Streaming Support**: Stream large responses with ease using callback functions
- **Proxy Support**: Easily configure proxies for your requests
## Installation
You can install RedC via pip:
```bash
pip install redc
```
## Quick Start
```python
import asyncio
from redc import Client
async def main():
async with Client(base_url="https://jsonplaceholder.typicode.com") as client:
# Make a GET request
response = await client.get("/posts/1")
response.raise_for_status()
print(response.status_code) # 200
print(response.json()) # {'userId': 1, 'id': 1, 'title': '...', 'body': '...'}
# Make a POST request with JSON data
response = await client.post(
"/posts",
json={"title": "foo", "body": "bar", "userId": 1},
)
response.raise_for_status()
print(response.status_code) # 201
print(response.json()) # {'id': 101, ...}
asyncio.run(main())
```
## License
MIT [LICENSE](https://github.com/AYMENJD/redc/blob/main/LICENSE)