Skip to main content

Python implementation of the DAG-CBOR codec.

Project description

py-dag-cbor: A Python implementation of DAG-CBOR

PyPI status Generic badge Checked with Mypy PyPI version shields.io PyPI status

This is a fully compliant Python implementation of the DAG-CBOR codec, a subset of the Concise Binary Object Representation (CBOR) supporting the IPLD Data Model and enforcing a unique (strict) encoded representation of items.

You can install this library with pip:

pip install py-dag-cbor

The core functionality of the library is performed by the encode and decode functions:

>>> import dag_cbor
>>> dag_cbor.encode({'a': 12, 'b': 'hello!'})
b'\xa2aa\x0cabfhello!'
>>> dag_cbor.decode(b'\xa2aa\x0cabfhello!')
{'a': 12, 'b': 'hello!'}

The documentation for this library was generated with pdoc.

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

dag-cbor-0.0.3.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

dag_cbor-0.0.3-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page