Skip to content

qiang0723/hyperledger-py

 
 

Repository files navigation

hyperledger-py

Build Status PyPI Version

Python SDK for Hyperledger fabric.

Currently, we support two branches:

  • restful(Stable) : implementated based on restful APIs.
  • grpc(Under development): implementated based on grpc.

This restful branch will follow the Hyperledger API to let users use those APIs by importing a simple python library. e.g.,

>>> from hyperledger.client import Client
>>> c = Client(base_url="http://127.0.0.1:7050")
>>> c.peer_list()
{u'peers': [{u'type': 1, u'ID': {u'name': u'vp1'}, u'address': u'172.17.0.2:7051'}, {u'type': 1, u'ID': {u'name': u'vp2'}, u'address': u'172.17.0.3:7051'}]}

If you want a quick start with a hyperledger cluster without any local configuration and vagrant setup, please use this compose-file.

Installation

The stable version is always available on PyPi.

$ pip install hyperledger --upgrade

The latest version is on github.

$ git clone https://github.com/yeasy/hyperledger-py.git
$ cd hyperledger-py
$ pip install -r requirements.txt
$ python setup.py install

Change Logs

See change log.

Documentation

The source is available in the docs directory.

Testing

All testing code is under tests directory.

After installation, you can run a quick full-functional testing (deploy, invoke, query chaincode, etc.) with your hyperledger cluster by

$ python tests/function_test.py HYPERLEDGER_API_URL

Contribution

Please see Contribution Instruction.

Acknowledgement

This work is highly inspired by the following projects:

License

This work is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

About

Python SDK for hyperledger fabric

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%