https://github.com/yeasy/hyperledger-py
Python SDK for hyperledger fabric v0.6, latest code is at github.com/hyperledger/fabric-sdk-py
https://github.com/yeasy/hyperledger-py
Last synced: 8 months ago
JSON representation
Python SDK for hyperledger fabric v0.6, latest code is at github.com/hyperledger/fabric-sdk-py
- Host: GitHub
- URL: https://github.com/yeasy/hyperledger-py
- Owner: yeasy
- License: apache-2.0
- Created: 2016-04-16T04:14:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T03:09:43.000Z (over 8 years ago)
- Last Synced: 2025-04-15T05:57:33.218Z (8 months ago)
- Language: Python
- Homepage:
- Size: 140 KB
- Stars: 62
- Watchers: 8
- Forks: 32
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hyperledger-py
[](https://travis-ci.org/yeasy/hyperledger-py)
[](https://pypi.python.org/pypi/hyperledger)
**The project has been accepted by Hyperledger Community as [fabric-sdk-py](https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-py).**
Python SDK for [Hyperledger fabric](https://github.com/hyperledger/fabric).
Currently, we support two branches:
* [restful](https://github.com/yeasy/hyperledger-py/tree/restful)(Stable) : implementated based on restful APIs.
* [grpc](https://github.com/yeasy/hyperledger-py/tree/grpc)(Under development): implementated based on grpc.
This restful branch will follow the [Hyperledger API](https://github.com/hyperledger/fabric/tree/master/docs/API) to let users use those APIs by importing a simple python library. e.g.,
```python
>>> 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](https://github.com/yeasy/docker-compose-files#hyperledger).
## Installation
The stable version is always available on PyPi.
```sh
$ pip install hyperledger --upgrade
```
The latest version is on [github](https://github.com/yeasy/hyperledger-py).
```sh
$ 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](docs/change_log.md).
## Documentation
The source is available in the [docs](docs) directory.
* [API Usage](docs/api.md)
## Testing
All testing code is under [tests](tests) directory.
After installation, you can run a quick full-functional testing (deploy,
invoke, query chaincode, etc.) with your hyperledger cluster by
```python
$ python tests/function_test.py HYPERLEDGER_API_URL
```
## Contribution
Please see [Contribution Instruction](docs/contribution.md).
## Acknowledgement
This work is highly inspired by the following projects:
* [Hyperledger](https://github.com/hyperledger/hyperledger)
* [requests](https://pypi.python.org/pypi/requests)
* [docker-py](https://github.com/docker/docker-py)
## License
This work is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for full license text.