Thanks for your interest in contributing! Here's how to get started.
# Clone the repo
git clone https://github.com/shanjairaj7/commune-python.git
cd commune-python
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install in development mode
pip install -e ".[dev]"pytest tests/ -vTests use httpx.MockTransport — no network calls or API keys needed.
- Type hints on all public functions and methods.
- Docstrings on all public classes and methods (Google style).
- Keep
from __future__ import annotationsat the top of every module. - Run
python3 -m py_compile commune/*.pyto check for syntax errors.
If the Commune API adds a new resource (e.g. /v1/contacts):
- Add Pydantic models to
commune/types.py. - Add a
_Contactsclass tocommune/client.py(sync) andcommune/async_client.py(async). - Wire it into
CommuneClient.__init__andAsyncCommuneClient.__init__. - Export new types from
commune/__init__.py. - Add tests in
tests/. - Update
README.mdandAPI_REFERENCE.md.
- One feature or fix per PR.
- Include tests for new functionality.
- Update
CHANGELOG.mdunder an[Unreleased]section. - Keep commits focused and descriptive.
Open an issue on GitHub with:
- Python version (
python3 --version) - SDK version (
pip show commune-mail) - Minimal reproduction code
- Full traceback
By contributing, you agree that your contributions will be licensed under the MIT License.