Skip to main content

Python bindings for canonical_json

Project description

Python package leveraging our Canonical JSON implementation in Rust.

In order to validate content signatures of our data, Canonical JSON gives us a predictable JSON serialization. And Rust allows us to reuse the same implementation between our server in Python (this package) and our diverse clients (Rust, Android/iOS, JavaScript).

Usage

pip install canonicaljson-rs
>>> import canonicaljson
>>>
>>> canonicaljson.dumps({"héo": 42})
'{"h\\u00e9o":42}'
  • canonicaljson.dumps(obj: Any) -> str

  • canonicaljson.dump(obj: Any, stream: IO) -> str

Development

We rely on a specific Python builder that automates everything around Rust bindings.

pip install maturin

In order to install the package in the current environment:

maturin develop

Run tests:

pytest

Release

  1. Create a release on Github on https://github.com/mozilla-services/python-canonicaljson-rs/releases/new

  2. Create a new tag vX.Y.Z (This tag will be created from the target when you publish this release.)

  3. Generate release notes

  4. Publish release

See Also

Other specs:

License

  • Mozilla Public License 2.0

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

canonicaljson_rs-0.6.0.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distributions

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded PyPy musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded PyPy musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl (678.4 kB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp312-none-win_amd64.whl (496.3 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

canonicaljson_rs-0.6.0-cp312-none-win32.whl (452.8 kB view hashes)

Uploaded CPython 3.12 Windows x86

canonicaljson_rs-0.6.0-cp312-cp312-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp312-cp312-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp312-cp312-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp312-cp312-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp312-cp312-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp312-cp312-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp312-cp312-macosx_11_0_arm64.whl (645.1 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp312-cp312-macosx_10_12_x86_64.whl (677.8 kB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp311-none-win_amd64.whl (496.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

canonicaljson_rs-0.6.0-cp311-none-win32.whl (453.3 kB view hashes)

Uploaded CPython 3.11 Windows x86

canonicaljson_rs-0.6.0-cp311-cp311-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp311-cp311-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ ARMv7l

canonicaljson_rs-0.6.0-cp311-cp311-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp311-cp311-macosx_11_0_arm64.whl (645.4 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp311-cp311-macosx_10_12_x86_64.whl (678.1 kB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp310-none-win_amd64.whl (496.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

canonicaljson_rs-0.6.0-cp310-none-win32.whl (453.3 kB view hashes)

Uploaded CPython 3.10 Windows x86

canonicaljson_rs-0.6.0-cp310-cp310-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp310-cp310-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ ARMv7l

canonicaljson_rs-0.6.0-cp310-cp310-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp310-cp310-macosx_11_0_arm64.whl (645.5 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp310-cp310-macosx_10_12_x86_64.whl (678.5 kB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp39-none-win_amd64.whl (496.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

canonicaljson_rs-0.6.0-cp39-none-win32.whl (453.2 kB view hashes)

Uploaded CPython 3.9 Windows x86

canonicaljson_rs-0.6.0-cp39-cp39-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp39-cp39-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ ARMv7l

canonicaljson_rs-0.6.0-cp39-cp39-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp39-cp39-macosx_11_0_arm64.whl (645.4 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp39-cp39-macosx_10_12_x86_64.whl (678.1 kB view hashes)

Uploaded CPython 3.9 macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp38-none-win_amd64.whl (495.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

canonicaljson_rs-0.6.0-cp38-none-win32.whl (453.4 kB view hashes)

Uploaded CPython 3.8 Windows x86

canonicaljson_rs-0.6.0-cp38-cp38-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp38-cp38-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ ARMv7l

canonicaljson_rs-0.6.0-cp38-cp38-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp38-cp38-macosx_11_0_arm64.whl (645.2 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp38-cp38-macosx_10_12_x86_64.whl (678.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.12+ x86-64

canonicaljson_rs-0.6.0-cp37-none-win_amd64.whl (496.0 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

canonicaljson_rs-0.6.0-cp37-none-win32.whl (452.9 kB view hashes)

Uploaded CPython 3.7 Windows x86

canonicaljson_rs-0.6.0-cp37-cp37m-musllinux_1_1_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

canonicaljson_rs-0.6.0-cp37-cp37m-musllinux_1_1_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ ARM64

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_s390x.whl (1.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ s390x

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_ppc64le.whl (1.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ ppc64le

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ i686

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ ARMv7l

canonicaljson_rs-0.6.0-cp37-cp37m-manylinux_2_24_aarch64.whl (1.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ ARM64

canonicaljson_rs-0.6.0-cp37-cp37m-macosx_11_0_arm64.whl (645.3 kB view hashes)

Uploaded CPython 3.7m macOS 11.0+ ARM64

canonicaljson_rs-0.6.0-cp37-cp37m-macosx_10_12_x86_64.whl (678.1 kB view hashes)

Uploaded CPython 3.7m macOS 10.12+ x86-64

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