Python implementation of the DAG-CBOR codec.
Project description
py-dag-cbor
: A Python implementation of DAG-CBOR
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
Release history Release notifications | RSS feed
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)
Built Distribution
dag_cbor-0.0.3-py3-none-any.whl
(11.1 kB
view hashes)