This is a Python based implementation of Hyperledger Fabric chaincode shim and contract API, which enables development of smart contracts using the Python language. Chaincodes (smart contracts) written in Python run inside Hyperledger Fabric peers.
src/
├── fabric_contract_api/ Python Contract API
└── fabric_shim/ Python chaincode shim (Fabric 2.x)
- fabric_contract_api - Contains the Python contract API used to write smart contracts with the high-level contract programming model.
- fabric_shim - Contains the Python classes that implement the chaincode shim API and the way to communicate with Fabric peers.
Make sure you have the following prereqs installed:
Create a virtual environment and install the development dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -e . -r requirements-dev.txt
Run the unit tests:
pytest tests/
We welcome contributions to the Hyperledger Fabric project in many forms. If you are interested in contributing updates to this project, please start with the contributing guide.
There is also a release guide describing the process for publishing new versions.
- Hyperledger Community
- Hyperledger mailing lists and archives
- Hyperledger Chat
- Hyperledger Fabric Wiki
- Hyperledger Code of Conduct
Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.