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 details)
Built Distribution
dag_cbor-0.0.3-py3-none-any.whl
(11.1 kB
view details)
File details
Details for the file dag-cbor-0.0.3.tar.gz
.
File metadata
- Download URL: dag-cbor-0.0.3.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b20eb43a4844ce762c0d9dc1cc1acef75854f414ae28053a60e3aad88b37a94e |
|
MD5 | 8c04a9e8de33a694c1ae9fb193c4a80e |
|
BLAKE2b-256 | 3c969a5ed8968b6ba2a16867d8f1f1a40d14b9e4ca4d0b86c22a5d523263816c |
File details
Details for the file dag_cbor-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: dag_cbor-0.0.3-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03bbf6eab11bf1d64c161a39333bec12a533308cce688df83a899e089f47c458 |
|
MD5 | aa9b3e338fdaaec0ae88f5657bea15c1 |
|
BLAKE2b-256 | bd8b539250b97fc2b960e69c2585def796e115b88a1619517735f99912d72e9d |