Skip to main content

cbo-rs

Build Status codecov PyPI

A Python CBOR (de)serialization module, powered by Rust.

Wraps the excellent serde_cbor crate and provides a pythonic interface via pyo3.

Installation

Python>=3.5 is required due to the requirements of pyo3.

Recommended to install from PyPI, e.g.

pip install cbors

To install from source, use maturin to build a wheel from repository root.

maturin build -i python3
pip install target/wheels/*.whl

Usage

Serialize data via cbors.dumpb, deserialize via cbors.loadb.

Interface is similar to the standard library's json module.

import cbors

b = cbors.dumpb("foo")
assert(b == b"cfoo")

s = cbors.loadb(b)
assert(s = "foo")

Limitations

As this uses serde_cbor under the hood, the same limitations apply here.

Notably, tags are not currently supported (see pyfisch/cbor#3).

If this functionality is important to you, cbor2 might be a better choice.

Development

For local development, it is recommended to create a virtual environment, and build the module via maturin develop.

A Dockerfile is provided which will build and install the module and run the test suite.

If you do not want to use docker, it is recommended to use tox for testing.

Pull requests welcome!

Metadata

Release files for cbors 0.1.4

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

Source distribution (sdist)

Source distribution for cbors 0.1.4
File Size Uploaded Provenance Actions
cbors-0.1.4.tar.gz 7.3 kB Without provenance Details for cbors-0.1.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cbors 0.1.4
File Actions
cbors-0.1.4-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details for cbors-0.1.4-cp38-cp38-manylinux1_x86_64.whl
cbors-0.1.4-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details for cbors-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
cbors-0.1.4-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details for cbors-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
cbors-0.1.4-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details for cbors-0.1.4-cp35-cp35m-manylinux1_x86_64.whl

Total release size: 733.3 kB

Release files / cbors-0.1.4.tar.gz

Download URL cbors-0.1.4.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5060b26e97e51d2f9754017b300da72d7ccb1bd6064ba3b8ee10797d8dea33c8
BLAKE2b-256 checksum
How to use checksums
1a5e9f8bf97ac3815baf846f65527b86b1f9aeb13f192091ade359a759eadc48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.8.3

Release files / cbors-0.1.4-cp38-cp38-manylinux1_x86_64.whl

Download URL cbors-0.1.4-cp38-cp38-manylinux1_x86_64.whl
Size 181.2 kB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e31108e7c8c09ffc2ea880e430b18185031bfc517ed19b9e06d836b896975c26
BLAKE2b-256 checksum
How to use checksums
285b813e1bbc7787b7c33fb8f87c64896bc166fb1931f410018aa758a28d77c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.8.3

Release files / cbors-0.1.4-cp37-cp37m-manylinux1_x86_64.whl

Download URL cbors-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
Size 181.2 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
84a38687a755e01e5300588fd3c52d76715184d488f5dd36e08491d1f71e0980
BLAKE2b-256 checksum
How to use checksums
aa491b7c64acc2829bbf790a88f8fe16ce814d11befa2cece36136d8ce0a89bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.8.3

Release files / cbors-0.1.4-cp36-cp36m-manylinux1_x86_64.whl

Download URL cbors-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
Size 181.5 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5bc7239b1a88e8cc49898dba16f7b0b29a7289fe401e770a04d1df971ca9d1f8
BLAKE2b-256 checksum
How to use checksums
17d873369559c8826ba1dc36eec0db699e43b1cb2facc29b857086c979a839bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.8.3

Release files / cbors-0.1.4-cp35-cp35m-manylinux1_x86_64.whl

Download URL cbors-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
Size 182.1 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
a03f8b56ce2b488ac18717104d68b72b2782d0b2fe33848a4df4b1e457f03cd3
BLAKE2b-256 checksum
How to use checksums
bdb1e30a7251fdeaa60a1e965acc80c45b3afc273f0120a59056aae71234d116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.8.3

Security for cbors 0.1.4

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