Thanks for your interest in contributing to the Biological Sovereignty Protocol Python SDK.
- Python
>=3.10 - Git
- (Optional) uv for fast env management
git clone https://github.com/Biological-Sovereignty-Protocol/bsp-sdk-python.git
cd bsp-sdk-python
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"uv venv
source .venv/bin/activate
uv pip install -e ".[dev,docs]"The uv path automatically applies the ecdsa>=0.19.2 override defined in pyproject.toml (see SECURITY.md for context).
pytest
pytest --cov=bsp_sdk --cov-report=term-missingruff check .
mypy bsp_sdkInstall optional docs extras and build with Sphinx:
pip install -e ".[docs]"
sphinx-build docs docs/_buildThen open docs/_build/index.html. The _build/ folder is git-ignored.
Runnable examples live in examples/:
python examples/01_create_beo.py
python examples/02_grant_consent.py
python examples/03_submit_biorecord.py
python examples/04_destroy_beo.pyWithout BSP_RELAYER_URL set, examples run in simulated mode.
- Ruff enforces formatting (line-length 100, target py310).
- Public APIs must have type hints. The project is
mypy --strictclean. - Google-style or NumPy-style docstrings on all public functions/classes (picked up by Sphinx Napoleon).
- Names follow PEP 8:
snake_casefor functions/variables,PascalCasefor classes.
Use Conventional Commits:
feat(access): add batch revoke API
fix(crypto): validate Ed25519 signature length
docs(sdk-python): expand BEOClient usage examples
- Fork or branch from
main:git checkout -b feat/my-thing. - Add or update tests. New public functions must ship with coverage.
- Run
pytest && ruff check . && mypy bsp_sdklocally before pushing. - Update
CHANGELOG.mdunder the[Unreleased]section. - Open a PR against
mainwith a clear summary and link to any related issue. - Be responsive to review feedback.
Do not file public issues for security vulnerabilities. See SECURITY.md for private disclosure instructions.
By contributing you agree that your contributions are licensed under the project's Apache-2.0 license.