Hyperledger Fabric Chaincode Python
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.
Documentation
Project structure
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.
Building and testing
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/
Contributing
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.
Community
- Hyperledger Community
- Hyperledger mailing lists and archives
- Hyperledger Chat
- Hyperledger Fabric Wiki
- Hyperledger Code of Conduct
License
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/.
Metadata
Release files for fabric-chaincode-python 2.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fabric_chaincode_python-2.5.3.tar.gz | 55.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fabric_chaincode_python-2.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.5 kB
Release files / fabric_chaincode_python-2.5.3.tar.gz
| Download URL | fabric_chaincode_python-2.5.3.tar.gz |
|---|---|
| Size | 55.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4e56e8f14a2e54303c1c37db66138e8f9e36583581e6379ebc957c9be194a1b
|
|
BLAKE2b-256 checksum How to use checksums |
27d9c957571366377156d7dd9ebd6d085f85e125e1b0756c009398f59681215c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / fabric_chaincode_python-2.5.3-py3-none-any.whl
| Download URL | fabric_chaincode_python-2.5.3-py3-none-any.whl |
|---|---|
| Size | 63.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68bf9b4557a2349fa01949a0a23e4cbd9d88cac65b523806080668c42d534b3a
|
|
BLAKE2b-256 checksum How to use checksums |
9289501e42b7e71e0c8ce8bd4b118ade039d717186926d4989d87ecfb8216f7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log