hyperledger/iroha-python

Name: iroha-python

Owner: Hyperledger

Description: Python library for Hyperledger Iroha, a simple distributed ledger.

Created: 2017-03-01 10:29:10.0

Updated: 2018-05-24 09:33:54.0

Pushed: 2017-10-10 06:17:57.0

Homepage: http://iroha.tech

Size: 649

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

iroha-python CircleCI

Python library for Hyperledger Iroha.

Install
Python

Supported Python versions: 2.7 and 3.5 (see tox.ini). Multiple Python versions can be installed with your system package manager or with the pyenv tool. The pyenv itself can also be installed with a system package manager or with the pyenv-installer script.

Example installation steps
stall pyenv using pyenv-installer
 -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
env initialization
rt PATH="${HOME}/.pyenv/bin:${PATH}"
 "$(pyenv init -)"
so initialize on startup; if you are using zsh, replace "~/.bashrc" with "~/.zshrc"
 'export PATH="${HOME}/.pyenv/bin:${PATH}"' >> ~/.bashrc
 'eval "$(pyenv init -)"' >> ~/.bashrc
stall the most recent Python versions (both 3 and 2)
v install 3.5.2
v install 2.7.13
ing both installed versions into the scope: we are testing against both versions
v global 3.5.2 2.7.13
ly the "tox" package needs to be installed manually
install tox
External dependencies

Download FlatBuffers, compile the flatc executable and place it into your PATH.

.circleci/config.yml contains working build commands. These commands might need some adaptation to your local environment.

Develop
First-time setup

Run python setup.py genfbs to generate the FlatBuffers schema.

Interactive shell

Run tox -e dev to get an IPython shell in a virtual environment with all dependencies installed.

New dependencies

After adding a new dependency, include it into the install_requires option of the setup.py script.

Python 2 compatibility

Familiarize yourself with the Python compatibility guidelines and supporting packages:

Put the following at the top of all your Python files (after a docstring and file-wide comments):

 __future__ import (absolute_import, division,
                    print_function, unicode_literals)
Test

tox tests the package under different virtual environments and with different Python versions. Simply execute the tox command to run all tests in all supported environments.

Compile proto
rotoc; python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. api.proto

*Future replace protobuf with flatbuffer ('A')/


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.