HTTPJ HTTPX fork with custom JSON serializer support.
- HTTPJ is nearly identical to HTTPX. The main difference lies in two extra parameters,
json_serializeandjson_deserialize, which afford you precise control over the serialization and deserialization of your objects in JSON format. - HTTPJ will remain synchronized with the mainstream HTTPX until similar functionality emerges.
Install HTTPJ using pip:
pip install httpj
Now, let's get started:
import datetime
import pprint
import httpj
import orjson
resp = httpj.post(
"https://postman-echo.com/post",
json={"dt": datetime.datetime.utcnow()},
json_serialize=lambda j: orjson.dumps(j, option=orjson.OPT_NAIVE_UTC), # optional
json_deserialize=orjson.loads, # optional
)
pprint.pprint(resp.json(), indent=4)
Release Information
Fixed
- Reintroduced supposedly-private
URLTypesshortcut. (#2673)
Release files for httpj 0.28.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| httpj-0.28.1.tar.gz | 139.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| httpj-0.28.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:212.6 kB
Release files / httpj-0.28.1.tar.gz
| Download URL | httpj-0.28.1.tar.gz |
|---|---|
| Size | 139.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0dfbb436dff634e9bad35922f795f0a9d7221a670d9459902b7cff3d01117378
|
|
BLAKE2b-256 checksum How to use checksums |
c3646d357c750ec4b2eb3e64aa311fcdaa542208c7310d43e16966c1f3923ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.8
|
Release files / httpj-0.28.1-py3-none-any.whl
| Download URL | httpj-0.28.1-py3-none-any.whl |
|---|---|
| Size | 72.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a276ac7347eebd29bed7f841c5c13108081b154dbfb70decc52238daf0cabdcb
|
|
BLAKE2b-256 checksum How to use checksums |
fd540dded96d993af150c875f81de4fe5aa908b9c28294437255fccd623e00b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.8
|