HTTPX fork with custom JSON serializer support
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httpj-0.28.1.tar.gz
(139.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
httpj-0.28.1-py3-none-any.whl
(72.7 kB
view details)
File details
Details for the file httpj-0.28.1.tar.gz.
File metadata
- Download URL: httpj-0.28.1.tar.gz
- Upload date:
- Size: 139.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dfbb436dff634e9bad35922f795f0a9d7221a670d9459902b7cff3d01117378
|
|
| MD5 |
f2ac6eaccccd6d606ff352bf3d3b3b42
|
|
| BLAKE2b-256 |
c3646d357c750ec4b2eb3e64aa311fcdaa542208c7310d43e16966c1f3923ef9
|
File details
Details for the file httpj-0.28.1-py3-none-any.whl.
File metadata
- Download URL: httpj-0.28.1-py3-none-any.whl
- Upload date:
- Size: 72.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a276ac7347eebd29bed7f841c5c13108081b154dbfb70decc52238daf0cabdcb
|
|
| MD5 |
0fbec90aafd28825e70924d5959a7b7f
|
|
| BLAKE2b-256 |
fd540dded96d993af150c875f81de4fe5aa908b9c28294437255fccd623e00b3
|