Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.74 KB

File metadata and controls

40 lines (27 loc) · 1.74 KB

Project Discord License: CAL 1.0 Twitter Follow

Holochain Serialization - Python

This project was generated using maturin, following the instructions given by Pyo3.

Set up a development environment

The developer environment for this project relies on Holonix, which you can find out more about in the Holochain getting started guide. Once you have Nix installed, you can create a new development environment by entering the following command into your shell at the root of this project:

nix develop

Then once the Nix shell has spawned, create a virtual environment and install dependencies:

python -m venv .venv
source .venv/bin/activate
pip install .

Verify changes

You can compile this Python module and the Rust code in one step with:

maturin develop

This will end up placing the module in your .venv's site_packages (something like .venv/lib/python3.11/site-packages/holochain_serialization). You can then run the test script to verify that you haven't broken anything with:

python test.py

You may of course have broken that check because if you change the input in any way, you will change the hashes that being output and checked against the currently expected values.