Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Flynn, the CBOR serializer

Flynn (his real name is Walter White Jr.), is a protagonist in Breaking Bad and the son of Walter White (a. k. a. Heisenberg).

Flynn is also a Python library providing CBOR [RFC7049] encoding and decoding with a traditional buffered and a streaming interface.

Usage

The Flynn API is really simple and inspired by existing Python serialisation modules like json and pickle. The flynn module has four methods called dumps, dump, loads and load, where dumps will return the serialised input as bytes string, while dump will write the serialised input to a file descriptor. The same applies to loads and load.

>>> flynn.dumps([1, [2, 3]])
b'\x82\x01\x82\x02\x03'
>>> flynn.loads(b'\x82\x01\x82\x02\x03')
[1, [2, 3]]

Furthermore, Flynn supports generators and other iterables as input for streaming support:

>>> flynn.dumps(range(5))
b'\x9f\x00\x01\x02\x03\x04\xff'
>>> flynn.loads(b'\x9f\x00\x01\x02\x03\x04\xff')
[0, 1, 2, 3, 4]

Or to generate a map using an iterable:

>>> flynn.dumps((((a, a) for a in range(5)), "map"))
b'\xbf\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\xff'
>>> flynn.loads(b'\xbf\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\xff')
{0: 0, 1: 1, 2: 2, 3: 3, 4: 4}

Metadata

Release files for flynn 1.0.0b2

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

Source distribution (sdist)

Source distribution for flynn 1.0.0b2
File Size Uploaded Provenance Actions
flynn-1.0.0b2.tar.gz 5.0 kB Without provenance Details for flynn-1.0.0b2.tar.gz

Release files / flynn-1.0.0b2.tar.gz

Download URL flynn-1.0.0b2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bb0004e3f6924b3148e3b537988356875c669fb502696fb2f5e366d7297b02d2
BLAKE2b-256 checksum
How to use checksums
def1f114cb847e78a33f755a6a82c1ccc29ea0986244344ee549acbb260f041e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for flynn 1.0.0b2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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