Skip to main content

unstd

stdlib-faithful replacements, with optional native acceleration where it preserves the contract. Modules follow the stdlib call surface, so migrating a call site is an import swap. JSON proves native eligibility and falls back to stdlib codecs to preserve formatting, values, callbacks and errors.

import json  # →
from unstd.serde import jsonx  # faithful json API; dumpb for compact transport

The base install is pure stdlib: depending on unstd adds zero third-party closure. Every accelerated backend rides an optional extra with a guarded import that falls back to the stdlib (or raises a clear ImportError where no fallback is faithful). Install unstd and you pay nothing. Install unstd[serde] and the serde modules light up.

Install

python3 -m pip install unstd
python3 -m pip install 'unstd[serde,ids,crypto]'

Groups

Group Extra Backend / fallback
serde unstd[serde] orjson / msgspec / pybase64 → stdlib json/base64
ids unstd[ids] uuid-utils → uid falls back to stdlib UUIDv7
crypto unstd[crypto] blake3 (required; hashlib ships BLAKE2, a different algorithm)
time unstd[time] timeutil is pure stdlib; zoned requires whenever, and timeutil's protobuf Timestamp bridge requires unstd[proto]
model unstd[model] pydantic (required)
rex unstd[rex] irregex → stdlib re
containers unstd[containers] sortedcontainers + immutables (required)
rand unstd[rand] numpy PCG64 → stdlib random; crypto is always secrets
pack unstd[pack] numpy → stdlib struct
clone — stdlib; exact-type walk, copy.deepcopy per foreign node
text unstd[text] rapidfuzz → stdlib difflib
audio unstd[audio] soundfile + numpy → stdlib wave
toml unstd[toml] read is tomllib; write requires tomlkit
yaml unstd[yaml] ruamel.yaml: safe YAML 1.2 and comment-preserving edits (required)
compress unstd[compress] zlib-ng → stdlib gzip, with faithful file framing and errors
proc — stdlib subprocess
fs — stdlib os
iters — stdlib itertools

clone, proc, fs, and iters ship in the base install.

Testing

The test suite follows Billy's owner-first Python layout: product contracts, cross-cutting assurance, shared support, and standalone tools. The P0 boundary suites exercise installed packaging, real TLS peers, filesystem/process failures, and parser/token security. The coverage plan maps parity, properties, fuzzing, penetration, fault injection, packaging, concurrency, resource, and performance obligations. Inspect implemented and planned lanes with uv run --no-sync python -m tests.tooling list; run the active suite with uv run --no-sync pytest -q.

The fuzz runner supplies eleven parser/token targets, authenticated corpora, deterministic mutation, and bounded Atheris campaigns. Run uv run --no-sync python -m tests.tooling.fuzz check to validate the inventory, or uv run --no-sync python -m tests.tooling.fuzz replay to replay every installed target. CI retains findings and coverage corpora.

The chaos runner exercises recorded filesystem, process, stream and clock/entropy failures and recovery. Run uv run --no-sync python -m tests.tooling.chaos run --seed 173 for a bounded installed-backend campaign with per-case journals and reproducible schedules.

The concurrency runner checks atomic file histories, UUID contention and fork safety, and shared cache/parser isolation. Run uv run --no-sync python -m tests.tooling.concurrency run --seed 173 for bounded installed-backend workers with retained histories and replay.

Prior art

  • orjson (Kloss) / msgspec (Fitzgerald) / pybase64 (aklomp libbase64) — the serde backends.
  • The guarded-optional-backend pattern is the one uvloop popularized: import the accelerator, fall back when it is absent.

License

Apache-2.0

Metadata

Release files for unstd 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unstd 3.0.0
File Size Uploaded Provenance
unstd-3.0.0.tar.gz 724.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for unstd 3.0.0
File Interpreter ABI Platform
unstd-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 885.4 kB

Release files / unstd-3.0.0.tar.gz

Download URL unstd-3.0.0.tar.gz
Size 724.7 kB
Tags Source
SHA-256 checksum
How to use checksums
242c966ec9575ee021913ac901150cdd057469ce0a20c99d5a74849f6688239a
BLAKE2b-256 checksum
How to use checksums
08d2bfa1759e17a8f88583f4de34f44e09a69d75440ebcabe4490b046e7a2441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / unstd-3.0.0-py3-none-any.whl

Download URL unstd-3.0.0-py3-none-any.whl
Size 160.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e933bbe0cee55287f078bf8db0fdf5491b606436d34e67db33ecbe5f56f4103f
BLAKE2b-256 checksum
How to use checksums
5a588deac4ac8e1a70136a3084a7144a29c9518534c00115cc28c9c42d7761bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for unstd 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unstd-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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