Skip to main content

Hyperledger Fabric Chaincode Python

GitHub License OpenSSF Best Practices OpenSSF Scorecard

Python Version GitHub Actions GitHub Release

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_chaincode_python/
    ├── fabric_contract_api/   Python Contract API
    └── fabric_shim/           Python chaincode shim
examples/
└── ccaas/                     Example chaincodes (Chaincode-as-a-Service)
  • 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.
  • examples - Example chaincode implementations. See the examples README and the examples structure for the layout, conventions, and quick start.

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

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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fabric-chaincode-python 2.5.4
File Size Uploaded
fabric_chaincode_python-2.5.4.tar.gz 57.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fabric-chaincode-python 2.5.4
File Interpreter ABI Platform
fabric_chaincode_python-2.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 122.5 kB

Release files / fabric_chaincode_python-2.5.4.tar.gz

Download URL fabric_chaincode_python-2.5.4.tar.gz
Size 57.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0c5b838afc6fdcd354631b4961191b910196cbc61aa97c1a322118efce97c8ee
BLAKE2b-256 checksum
How to use checksums
48def1111d9cbdc08517e265a9dcb886b809ed91188217b6a29380ae79b402aa
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 5, 2026.

Transparency log

Release files / fabric_chaincode_python-2.5.4-py3-none-any.whl

Download URL fabric_chaincode_python-2.5.4-py3-none-any.whl
Size 65.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ca9e424caaef08f53104ff036e794b74721a37797d75d24a52daafe04de49bb
BLAKE2b-256 checksum
How to use checksums
012a19df011ddc477fc539c176c813182a2333bb224a0d86ca0ac240c16a4bcd
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 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.5.4 This release

2 release files

2.5.3

2 release files

2.5.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page