Skip to main content

Simple decoder and encoder for CBOR

Project description

Flynn (his real name is Walter Junior), 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

Flynn provides the high-level API provided by the flynn module and the low-level encoding and decoding APIs which are provided by flynn.encoder and flynn.decoder.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flynn-1.0.0b1.tar.gz (3.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page