Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canonicaljson-rs

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canonicaljson-rs

Python bindings for canonical_json

  • 0.6.0
  • PyPI
  • Socket score

Maintainers
2

canonicaljson-rs ################

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

.. code-block ::

pip install canonicaljson-rs

.. code-block :: python

>>> 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.

.. code-block ::

pip install maturin

In order to install the package in the current environment:

.. code-block ::

maturin develop

Run tests:

.. code-block ::

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc