Python Apache-2.0

fabric-sdk-py

Hyperledger Fabric Python SDK

H

hyperledger

Dernière activité 6 sept. 2026
hyperledger/fabric-sdk-py

416

étoiles

203

forks

38

issues ouvertes

blockchaindistributed-ledgerfabrichyperledgerpython

Ce README est souvent en anglais.

Fabric-SDK-Py

Fabric-SDK-Py is the Python 3.x implementation of Hyperledger Fabric SDK!

Currently, it mainly supports Fabric 1.4.x version.

pyenv instructions

  1. Follow instructions: https://github.com/pyenv/pyenv?tab=readme-ov-file#installation
  2. Install Python 3:
 pyenv install 3.12
 pyenv global 3.12
 pip3 install virtualenv

Pre-requisite

The SDK requires the Python3 and Libssl pkgs.

Run the following cmd to install the pre-requisites if you do not have:

OS command
Ubuntu/Debian sudo apt-get install python-dev python3-dev libssl-dev
Redhat/CentOS sudo yum install python-devel python3-devel openssl-devel
MacOS brew install python python3 openssl

More details to build the crypto lib, can be found at Install Python Cryotography Lib.

Tutorial

Read the Tutorial (Source) to get familiar with the APIs. A jupyter notebook explaining the sample code can be found here.

Quick Testing

Use Virtual Env

virtualenv helps provide a clean environment, suggest to use it to test.

$ pip3 install virtualenv # install the virtualenv tool if not installed
$ make venv  # create a virtual env
$ source venv/bin/activate
$ # Do the testing here
$ deactivate  # deactive the virtual env
$ make clean # clean the temporary files

Run Integration Testing

The following command will run the testing.

$ make check # Check environment and run tests
$ make test # Only run test cases
$ tox -e py3 -- test/integration/ca_test.py  # Run specified test case

Generating Docker images

The following command will build the Docker image hyperledger/fabric-sdk-py.

$ make image

Regenerating protos

Make sure you have grpcio-tools installed (pip install grpcio-tools)

$ make proto

Change Logs

See Change Log for the commit logs. Run make changelog to update the changelog before new release.

Bug, Question and Code Contributions

Welcome for any kind of contributions, e.g., bugs, questions and documentation!

Recommend to read How to Contribution before taking action.

License

The Hyperledger Fabric-SDK-Py software uses the Apache License Version 2.0 software license.

Creative Commons License
This document is licensed under a Creative Commons Attribution 4.0 International License.

Projets similaires

Solana Python SDK

Pythonblockchainpythonsdk
Mmichaelhly
1,4 k étoiles339

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.

Goblockchainconfidentialityconsensus
Hhyperledger
16,7 k étoiles9,1 k

Introduce technologies on blockchain and distributed ledger, from theory to practice with bitcoin, ethereum and hyperledger.

Pythonbitcoinblockchainbook
Yyeasy
7,1 k étoiles1,9 k