Skip to main content

lombokserde (Python)

Zero-dependency JSON (RFC 8259), TOML (v1.0) and MessagePack serialization with byte-identical output across the five LombokSerde ports (Rust, Go, TypeScript, Python, PHP).

Part of the LombokSerde monorepo — the Python port passes the 176 shared deterministic vectors bit for bit in CI (vectors/lombokserde-vectors-v1.json).

Install

pip install lombokserde

Requires Python >= 3.9. No dependencies.

Quick start

import lombokserde as ls

v = ls.json_decode(b'{"hello": "world"}')
out = ls.json_encode(v)            # b'{"hello":"world"}'

t = ls.json_decode(b'{"b": 2, "a": 1}')
ls.json_encode(t)                  # b'{"a":1,"b":2}' — keys sorted bytewise

ls.toml_encode(ls.json_decode(b'{"n": 1}'))    # b'n = 1\n'
ls.msgpack_encode(ls.json_decode(b'[1, 2]'))   # minimal-width families

API

Function Notes
json_decode(data: bytes, opts: JsonOptions | None = None) -> Any exactly one value; trailing characters are an error
json_encode(v, opts: JsonOptions | None = None) -> bytes sorted keys, pinned float presentation
toml_decode(data: bytes, opts: TomlOptions | None = None) / toml_encode(v, opts: TomlOptions | None = None) -> bytes TOML v1.0
msgpack_decode(data: bytes, opts: MsgPackOptions | None = None) / msgpack_encode(v, opts: MsgPackOptions | None = None) -> bytes minimal-length families
SerdeError every failure carries a stable error code (error.SerdeErrorCode)
Value, Datetime, DatetimeKind, make_table, table_get the value model shared by all five ports

Deterministic by contract: table keys are sorted by UTF-8 bytewise order, floats use shortest-roundtrip digits with pinned presentation rules (integral floats keep one fractional digit, exponential form from 1e+21 / below 1e-7), and MessagePack uses the minimal-length family for every type. The same Value encodes to exactly the same bytes in every port.

See the specification for the normative details.

License

Apache-2.0

Metadata

Release files for lombokserde 0.1.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 lombokserde 0.1.0
File Size Uploaded Provenance Actions
lombokserde-0.1.0.tar.gz 25.8 kB With provenance Details for lombokserde-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 49.6 kB

Release files / lombokserde-0.1.0.tar.gz

Download URL lombokserde-0.1.0.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0aca5d5e45f080dc5a7ffba9ecadd422e4b00a1ecb1016fadecc0f3212f01de6
BLAKE2b-256 checksum
How to use checksums
a15de93404e14d9f1bd1111df839eeff4771b1a68f233befe8875151cefe780c
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 Nov 2, 2026.

Transparency log

Release files / lombokserde-0.1.0-py3-none-any.whl

Download URL lombokserde-0.1.0-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cb192585d583e3bb1cedf9b4f1f154e24cd37e4bcc99d014c6b800803074322
BLAKE2b-256 checksum
How to use checksums
57ba774251564c17a417319b6e033ab12a4529d30a1c0e610ac0a2f246d7d4f9
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 Nov 2, 2026.

Transparency log

Security for lombokserde 0.1.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lombokserde-0.1.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 Nov 2, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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