Skip to content

Commit 7ad2d88

Browse files
Merge pull request #2 from kmilodenisglez/docs/headers-and-readme
Docs/headers and readme
2 parents 091e430 + f68b4f3 commit 7ad2d88

16 files changed

Lines changed: 161 additions & 18 deletions

‎ADOPTERS.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Adopters
2+
3+
This page lists organizations and projects that use `fabric-chaincode-python` in production or as the basis for their work. If your organization uses this project, we would love to add you to this list.
4+
5+
Adding your organization is easy: open a pull request that adds a row to the table below, including a publicly verifiable reference (a URL to a blog post, case study, documentation, or other verifiable public material).
6+
7+
> A description of what constitutes an adopter and the requirements for being listed can be found in the
8+
> [LFDT Defining Adopters](https://lf-decentralized-trust.github.io/governance/governing-documents/repository-structure/defining-adopters.html) document.
9+
10+
## Adopters
11+
12+
| Organization | Project / Use case | Reference |
13+
|--------------|--------------------|-----------|
14+
| _(Add your organization here)_ | _(Brief description of usage)_ | _(Public verifiable URL)_ |
15+
16+
## How to Add Your Organization
17+
18+
1. Fork the repository.
19+
2. Add a row to the table above with your organization, a brief description of how you use the project, and a publicly verifiable reference URL.
20+
3. Submit a pull request.
21+
22+
The list is maintained by the project maintainers but can be updated by anyone — including adopters and third parties — as long as the reference is publicly verifiable.

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in the
4+
[GitHub Releases](https://github.com/hyperledger/fabric-chaincode-python/releases)
5+
for `hyperledger/fabric-chaincode-python`.
6+
7+
Each release entry lists the changes, deprecations, and breaking changes introduced.

‎CODE_OF_CONDUCT.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Code of Conduct Guidelines
2+
==========================
3+
4+
Please review the Hyperledger [Code of
5+
Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct)
6+
before participating. It is important that we keep things civil.
7+
8+
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

‎NOTICE‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Fabric Chaincode for Python
2+
Copyright 2023-2026 The Hyperledger Fabric Contributors
3+
4+
This product includes software developed at
5+
Hyperledger (https://www.hyperledger.org/) and the
6+
Linux Foundation Decentralized Trust (https://www.lfdecentralizedtrust.org/).
7+
8+
This product is licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this product except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17+
License for the specific language governing permissions and limitations under
18+
the License.

‎README.md‎

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,76 @@
1-
# fabric-chaincode-python
1+
# Hyperledger Fabric Chaincode Python
2+
3+
![GitHub License](https://img.shields.io/github/license/hyperledger/fabric-chaincode-python)
4+
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/14928/badge)](https://bestpractices.coreinfrastructure.org/projects/14928)
5+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/hyperledger/fabric-chaincode-python/badge)](https://scorecard.dev/viewer/?uri=github.com/hyperledger/fabric-chaincode-python)
26

3-
[![Lifecycle](https://img.shields.io/badge/lifecycle-experimental- orange.svg)](https://github.com/hyperledger/fabric-chaincode-python/blob/main/lifecycle.md)
47
[![Python Version](https://img.shields.io/pypi/pyversions/fabric-chaincode-python.svg)](https://pypi.org/project/fabric-chaincode-python/)
5-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
68
[![GitHub Actions](https://github.com/hyperledger/fabric-chaincode-python/workflows/CI/badge.svg)](https://github.com/hyperledger/fabric-chaincode-python/actions?query=workflow%3ACI)
79
[![GitHub Release](https://img.shields.io/github/v/release/hyperledger/fabric-chaincode-python.svg)](https://github.com/hyperledger/fabric-chaincode-python/releases)
810

9-
# Hyperledger Fabric Chaincode shim and Contract API for Python
10-
11-
This repository provides the Python implementation of Hyperledger Fabric chaincode shim and contract API. Chaincodes (smart contracts) can be written in Python to run inside Hyperledger Fabric peers.
11+
This is a Python based implementation of Hyperledger Fabric chaincode shim and contract
12+
API, which enables development of smart contracts using the Python language. Chaincodes
13+
(smart contracts) written in Python run inside Hyperledger Fabric peers.
1214

1315
## Documentation
1416

15-
- API documentation: https://hyperledger.github.io/fabric-chaincode-python/
16-
- Full Documentation on Hyperledger Fabric: https://hyperledger-fabric.readthedocs.io/
17-
- Samples repository: https://github.com/hyperledger/fabric-samples
18-
- Quick-start tutorial: TUTORIAL.md
17+
- [API documentation](https://hyperledger.github.io/fabric-chaincode-python/)
18+
- [Full Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/)
19+
- [Samples repository](https://github.com/hyperledger/fabric-samples)
20+
21+
## Project structure
22+
23+
```
24+
src/
25+
├── fabric_contract_api/ Python Contract API
26+
└── fabric_shim/ Python chaincode shim (Fabric 2.x)
27+
```
28+
29+
- **fabric_contract_api** - Contains the Python contract API used to write smart contracts with the high-level contract programming model.
30+
- **fabric_shim** - Contains the Python classes that implement the chaincode shim API and the way to communicate with Fabric peers.
1931

20-
## Compatibility
32+
## Building and testing
2133

22-
For details on what Python versions and Hyperledger Fabric versions can be used, see the [COMPATIBILITY.md](COMPATIBILITY.md).
34+
Make sure you have the following prereqs installed:
2335

24-
## npm Shrinkwrap
36+
- [Python](https://www.python.org/) 3.11 or later
37+
- [pip](https://pip.pypa.io/en/stable/)
2538

26-
Strongly recommended to create a `requirements.txt` file after testing and before putting your contract into production.
39+
Create a virtual environment and install the development dependencies:
40+
41+
```
42+
python3 -m venv .venv
43+
source .venv/bin/activate
44+
pip install -e . -r requirements-dev.txt
45+
```
46+
47+
Run the unit tests:
48+
49+
```
50+
pytest tests/
51+
```
2752

2853
## Contributing
2954

30-
If you are interested in contributing updates to this project, please start with the [contributing guide](CONTRIBUTING.md).
55+
We welcome contributions to the Hyperledger Fabric project in many forms. If you are
56+
interested in contributing updates to this project, please start with the
57+
[contributing guide](CONTRIBUTING.md).
58+
59+
There is also a [release guide](RELEASING.md) describing the process for publishing new
60+
versions.
61+
62+
## Community
3163

32-
There is also a [release guide](RELEASING.md) describing the process for publishing new versions.
64+
- [Hyperledger Community](https://www.hyperledger.org/community)
65+
- [Hyperledger mailing lists and archives](http://lists.hyperledger.org/)
66+
- [Hyperledger Chat](http://chat.hyperledger.org/channel/fabric)
67+
- [Hyperledger Fabric Wiki](https://wiki.hyperledger.org/display/Fabric)
68+
- [Hyperledger Code of Conduct](CODE_OF_CONDUCT.md)
3369

34-
## Build Status
70+
## License <a name="license"></a>
3571

36-
CI runs with Python 3.11 on `main` and `release-*` branches, and on pull requests.
72+
Hyperledger Project source code files are made available under the Apache License,
73+
Version 2.0 (Apache-2.0), located in the [LICENSE](LICENSE) file. Hyperledger Project
74+
documentation files are made available under the Creative Commons Attribution 4.0
75+
International License (CC-BY-4.0), available at
76+
http://creativecommons.org/licenses/by/4.0/.

‎SECURITY.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Security Policy
2+
3+
We take the security of `fabric-chaincode-python` seriously. This document describes how to report a vulnerability and how we handle it.
4+
5+
## Reporting a Vulnerability
6+
7+
Please **do not** open a public issue for security vulnerabilities. Instead, report them privately so they can be addressed before disclosure.
8+
9+
To report a vulnerability, contact the project maintainers directly. See [MAINTAINERS.md](MAINTAINERS.md) for contact information.
10+
11+
Vulnerabilities in the broader Hyperledger Fabric ecosystem should be reported in accordance with the
12+
[Hyperledger Fabric security policy](https://github.com/hyperledger/fabric/blob/main/SECURITY.md).
13+
14+
## Responsible Disclosure
15+
16+
We follow a coordinated disclosure process:
17+
18+
1. You report the vulnerability privately to the maintainers.
19+
2. The maintainers acknowledge receipt and begin an assessment.
20+
3. A fix is prepared, tested, and released.
21+
4. The vulnerability is disclosed publicly only after the fix is available.
22+
23+
We ask that you keep the details confidential until a fix has been released.
24+
25+
## Scope
26+
27+
- The Python chaincode shim and contract API implemented in this repository (`src/`).
28+
- Supporting build and test tooling under `scripts/` and `tests/`.
29+
30+
Third-party dependencies are outside this repository's direct control; please report issues with them to their respective projects.
31+
32+
## Supported Versions
33+
34+
Security fixes are provided for the latest stable release and, where feasible, recent releases still under active maintenance. See [RELEASING.md](RELEASING.md) for the release and support policy.
35+
36+
## Thanks
37+
38+
We appreciate responsible security researchers who help us improve the security of this project.

‎src/fabric_shim/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# SPDX-License-Identifier: Apache-2.0
12
__all__ = ["chaincode", "handler", "interfaces", "iterators", "server", "stub"]

‎src/fabric_shim/handler.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
12
import datetime
23
from typing import AsyncIterable
34
import asyncio

‎src/fabric_shim/interfaces.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
12
from abc import ABC, abstractmethod
23

34
from fabric_protos.peer import proposal_response_pb2 as pb

‎src/fabric_shim/logger.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)