Pytreexo
Introduction
Pytreexo is a collection of bindings over the rustreexo library. It provides all the functionality of rustreexo in python, with the speed of Rust.
Installation
Requirements
- Python 3.6+
- Rust 1.41+ (if you build from source)
- librustreexo (if you don't build from source)
From PyPI
pip install pytreexo
From source
Clone the repository and build librustreexo
git clone https://github.com/mit-dci/utreexo
cd utreexo/c-rustreexo
make install
Install the python lib
pip install ./pytreexo/
Usage
from pytreexo import Proof, Stump
# Create a new stump
s = Stump()
# Create a new proof
p = Proof()
# Add some elements
i = [bytes.fromhex("37cb3336f40b13170f5eb17b056adbee825c5287e9f1440ab63482aea51e85da")] * 100
update_data = s.modify(i, [], p)
# Update the proof to reflect the changes
proof.update(update_data, [], i, [], [0, 1, 2, 3])
# See if serialization rtt
assert Proof.parse(i) == proof
Documentation
Documentation is available at https://pytreexo.readthedocs.io/en/latest/
License
Pytreexo is licensed under the MIT license. See LICENSE for more information.
Release files for pytreexo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytreexo-0.1.1.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytreexo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / pytreexo-0.1.1.tar.gz
| Download URL | pytreexo-0.1.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f40900d362e27472a4e99bac13dd936b2ab44d7f048e08704268d4a98f1fedb
|
|
BLAKE2b-256 checksum How to use checksums |
745d508017b420a767fa97404ef0e478ea05066a0cf745550df63b5c9ba337bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / pytreexo-0.1.1-py3-none-any.whl
| Download URL | pytreexo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3e4a3d6e841cfe0e6ea98c8aa565fa58074ca754a189b3298938b685a847677
|
|
BLAKE2b-256 checksum How to use checksums |
385335ff9f52c89bc506250a0db7492ca9ca3981e20453948f676f46bd774281
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|