Modern, async-first HTTP client for Python Β· Zero external dependencies Β· Built on standard library
from reqivo import Reqivo
with Reqivo(base_url='https://api.github.com') as client:
response = client.get('/users/octocat')
print(response.json())Or async:
import asyncio
from reqivo import AsyncReqivo
async def main():
async with AsyncReqivo(base_url='https://api.github.com') as client:
response = await client.get('/users/octocat')
print(response.json())
asyncio.run(main())Reqivo is a modern, async-first HTTP client library built entirely on Python's standard library. No external dependencies, pure performance.
Reqivo is not a requests replacement. It's a modern HTTP foundation.
Reqivo exists to bridge the gap between low-level socket/ssl usage and the need for a fast, modern HTTP client:
- Using only the standard library (Python 3.9+)
- Providing an async-first API with sync support
- Supporting modern protocols (HTTP/1.1, HTTP/2, WebSockets)
- Maintaining zero external dependencies for maximum portability
Reqivo is for:
- Developers who want async HTTP without heavyweight dependencies
- Teams building cloud-native applications
- Projects where dependencies matter (embedded systems, security-critical apps)
- Anyone seeking performance and simplicity
pip install reqivofrom reqivo import Reqivo
def log_request(method, url, headers):
"""Hook that logs every outgoing request and passes it through."""
print(f"-> {method} {url}")
return method, url, headers
# Fluent API: configure base URL, auth, and hooks in one chain
client = (
Reqivo(base_url='https://api.example.com', timeout=10)
.bearer_token('my-token')
.on_request(log_request)
)
response = client.get('/data')
# -> GET https://api.example.com/data
print(response.status) # 200
print(response.json()) # {"key": "value"}
client.close()from reqivo import Session
with Session(base_url='https://api.example.com') as session:
response = session.get('/data')
session.put('/data/1', body=b'{"updated": true}')
session.delete('/data/1')import asyncio
from reqivo import AsyncReqivo
async def main():
async with AsyncReqivo(base_url='https://api.example.com') as client:
response = await client.get('/data')
await client.post('/data', body=b'{"key": "value"}')
return response.json()
asyncio.run(main())from reqivo import Session
def file_chunks():
with open('large_file.bin', 'rb') as f:
while chunk := f.read(8192):
yield chunk
with Session() as session:
session.post('https://upload.example.com/files', body=file_chunks())from reqivo import Reqivo
client = Reqivo()
ws = client.websocket(
'wss://echo.websocket.org',
auto_reconnect=True,
max_reconnect_attempts=5,
)
ws.connect()
ws.send('Hello WebSocket!')
message = ws.receive()
ws.close()- β Zero external dependencies: Pure Python (Python 3.9+)
- β Async-first design: Built for modern async/await workflows
- β Sync support: Also works in synchronous code
- β
Unified Facade:
Reqivo/AsyncReqivoas single entry points with fluent API - β Full HTTP methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- β
Global config:
base_urlanddefault_timeoutat session level - β Hooks system: Pre-request and post-response interceptors (sync and async)
- β Streaming uploads: Chunked transfer encoding for iterables and file-like objects
- β HTTP/1.1 support: Full protocol implementation with automatic redirects
- β WebSocket support: Sync and async clients with auto-reconnect and configurable frame limits
- β Connection pooling: LIFO connection reuse with semaphore-based limits
- β Type hints: Fully typed following PEP 561
- β
Memory efficient: Optimized with
__slots__on all core classes - β Comprehensive testing: 97%+ test coverage
- π Mutual TLS / Certificate Pinning (Planned v0.4.0)
- π Structured Logging & Metrics (Planned v0.5.0)
- π HTTP/2 support (Planned v1.0.0)
| Feature | Reqivo | requests | httpx | aiohttp |
|---|---|---|---|---|
| Zero dependencies | β | β | β | β |
| Async/await native | β | β | β | β |
| Sync support | β | β | β | β |
| Request/Response hooks | β | β | β | β |
| Streaming uploads | β | β | β | β |
| WebSocket support | β | β | β | β |
| WebSocket auto-reconnect | β | β | β | β |
| HTTP/2 support | π | β | β | β |
| Connection pooling | β | β | β | β |
| Type hints (PEP 561) | β | β | ||
Memory optimized (__slots__) |
β | β | β | |
| Coverage tested β₯ 97% | β | β | β | β |
| Standard library only | β | β | β | β |
Note: Benchmark suite coming soon in a future release.
Comprehensive examples and documentation are available in the Examples Directory:
- Quick Start - Installation, basic GET/POST, async introduction
- Async Patterns - Concurrent requests, async patterns
- Session Management - Cookies, authentication, persistent connections
- Error Handling - Exception handling, retry logic, circuit breaker
- Advanced Usage - Connection pooling, streaming, WebSockets
# Run all tests with tox
tox
# Run specific Python version
tox -e py312
# Run with coverage
tox -e py312
coverage html && open htmlcov/index.html- Python 3.9 or higher
- No external dependencies for core functionality
We welcome contributions! See CONTRIBUTING.md for guidelines.
MIT Β© 2026 β Rodrigo Ezequiel RoldΓ‘n
View full license
- CHANGELOG - Version history and release notes
- GitHub Issues - Bug reports and feature requests
- Milestones - Planned features and development timeline