Skip to content

i1i1/pythonize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iroha python

Python library for Hyperledger Iroha 2.

Install

You should install rust (cargo) and python.

pip install maturin
maturin build

Architecture

Stack

Architecturally python library uses rust client library. It is done via wrapping classes using rust library pyo3.

The data model of iroha itself is expected to be just classes without some special methods (without sidechannels, like doing http request). Communication channel for rust python methods using rust data model is achieved using pythonize rust library. It allows to represent almost all rust structures using python objects (via serde serialization).

Project layout

Python library

Python library right now is in iroha_python/iroha2. This directory has some directories:

  • iroha2 -- iroha2 library itself. Contains client and key generation at root
  • iroha2.crypto -- iroha crypto bindings
  • iroha2.data_model -- data model with all instructions, queries and expressions
  • iroha2.sys -- raw bindings to rust structures wrapped around python objects

Rust code

Generating python sys sources

There is a need to regenerate sys sources and update client library after major rust updates in data model.

cd generate
cargo run ../iroha2/sys

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%