req2
A proof-of-concept drop-in style replacement for the popular requests HTTP client that
uses pycurl as the transport layer. The library aims to mimic the surface level API of Requests while
providing additional timing data sourced from libcurl metrics.
Features
- Familiar top-level helpers like
get,post, andrequest. - A
Sessionobject with persistent cookies, basic authentication helpers, and redirect handling. - Response helpers for accessing JSON bodies, streaming content, cookies, and raising for HTTP errors.
- A new
Response.timingsmapping exposing DNS lookup, connection, TLS handshake, TTFB, content transfer, and total times.
Example
import req2 as requests
response = requests.get("https://httpbin.org/get")
print("Status:", response.status_code)
print("Total time:", response.timings["total"])
print("Body:", response.text[:60])
This project is in an early stage and currently focuses on providing the timing API while covering the most commonly used request options including query parameters, JSON payloads, cookies, redirects, and basic authentication.
Metadata
Release files for req2 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| req2-0.1.0.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| req2-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.7 kB
Release files / req2-0.1.0.tar.gz
| Download URL | req2-0.1.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fe7341073112b6ceef54b7b970dea3e7706716d116b8bde028afce40e84edae
|
|
BLAKE2b-256 checksum How to use checksums |
fd9f644170b8ca6dd806b37accd06e1589f55ccb3cdd7aec943a9c3b3d3d29a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / req2-0.1.0-py3-none-any.whl
| Download URL | req2-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e54132f2d6944d272a2bf2e150ed28661a509693b7eb49b31e6215a7e372603a
|
|
BLAKE2b-256 checksum How to use checksums |
dd7567a76f01e7cc3f43e7b4bf554b81a28f3f12d3e59372daa36ef8f7ebf2f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|