Skip to main content

HTTPJ

HTTPJ HTTPX fork with custom JSON serializer support.

Test Suite Package version

  • HTTPJ is nearly identical to HTTPX. The main difference lies in two extra parameters, json_serialize and json_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 URLTypes shortcut. (#2673)

Full changelog

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)

Source distribution for httpj 0.28.1
File Size Uploaded
httpj-0.28.1.tar.gz 139.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for httpj 0.28.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.28.1 This release

2 release files

0.27.2

2 release files

0.27.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page