serify — Python worker library
Python worker library for serify, a cross-language serialization conformance harness.
You define a schema and test cases once; each target language ships a small
worker program that serializes and deserializes the data, and the serify
CLI drives every worker through the same cases and compares their output
byte-for-byte. This package is what a Python worker imports.
Install
pip install serify
Usage
@serify_model reads the dataclass annotations and generates the field-map
conversion. You supply the byte layout and register it per format:
from dataclasses import dataclass, field
from serify import Format, Type, run_suite, serify_model
@serify_model
@dataclass
class UserRecord:
user_id: int
username: str
score: float
email: str = field(default="", metadata={"serify": "email_addr"})
def marshal(self) -> bytes:
... # your byte layout
@classmethod
def unmarshal(cls, data: bytes) -> "UserRecord":
... # its inverse
if __name__ == "__main__":
run_suite({
"user": Type(UserRecord, {
"binary": Format(UserRecord.marshal, UserRecord.unmarshal),
}),
})
Field names map to schema keys as written; metadata={"serify": "key"} renames
one. Nested structs work by decorating the nested dataclass, and dict[str, X]
maps to map<string,X>.
run_suite takes over stdin/stdout to speak the NDJSON protocol the CLI drives,
so a worker's own output must go to stderr.
Documentation
Full documentation, the protocol spec, and reference workers for all nine languages live in the main repository.
License
Apache-2.0
Metadata
Release files for serify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serify-0.1.0.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / serify-0.1.0.tar.gz
| Download URL | serify-0.1.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1589a0ad1ee98421bf236977547c90772e7365273f89f68856007a340cc16c53
|
|
BLAKE2b-256 checksum How to use checksums |
32b3c03adf1865dca3701245d1939d73156f901847023c14fe4ce673999127e0
|
| 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 Aug 19, 2026.
Transparency logRelease files / serify-0.1.0-py3-none-any.whl
| Download URL | serify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a47d988f21da8a1be5bd8729b5ad5de61408a7934853df0fb3af908c2adb9f61
|
|
BLAKE2b-256 checksum How to use checksums |
a5b82291b5c6350a952ce4414fa958248bacfa10c7f933e1c522ae8d71362085
|
| 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 Aug 19, 2026.
Transparency log