This repository preserves the Python client for Hyperledger Fabric v0.6. Development moved to Hyperledger Fabric SDK for Python. Its README describes support primarily for Fabric 1.4.x.
The original REST branch and gRPC branch are available for historical reference.
The REST client called the Fabric v0.6 API. For example:
>>> 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.
The original REST client was published on PyPI as hyperledger.
$ pip install hyperledger --upgradeTo inspect the original source, clone this repository.
$ git clone https://github.com/yeasy/hyperledger-py.git
$ cd hyperledger-py
$ pip install -r requirements.txt
$ python setup.py installSee change log.
The source is available in the docs directory.
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_URLPlease see Contribution Instruction.
This work is highly inspired by the following projects:
This work is licensed under the Apache License, Version 2.0. See LICENSE for full license text.