Contributing¶
Thank you for your interest in contributing to the eupago Python SDK!
Setup in 3 commands¶
git clone https://github.com/bilouro/eupago-python.git && cd eupago-python
pip install -e ".[dev]"
pre-commit install
This installs the SDK in editable mode with all development dependencies (ruff, mypy, pytest, pre-commit).
Running checks¶
All checks must pass before each commit:
How to add a new payment method¶
The SDK follows a consistent pattern for each payment method:
- Create the service file in
src/eupago/services/ - Follow
mbway.pyas the reference implementation - Register in the client (
_client.py) - Add tests in
tests/unit/ - Update
services/__init__.py
Each service normalizes the eupago API field names (which differ across endpoint generations) into a single English vocabulary — match the existing services for consistency.
Pull Requests¶
- One feature or fix per PR — do not mix different functionalities
- Include tests for new code — minimum 85% coverage
- Update CHANGELOG.md under the
[Unreleased]section - All CI checks must pass — lint, types, tests (Python 3.9-3.13)
- Describe what changed and why in the PR body
Typical workflow¶
# 1. Create a branch
git checkout -b feature/payshop-service
# 2. Develop and test
pytest tests/unit/test_payshop.py
# 3. Verify everything
ruff check . && ruff format --check . && mypy src/ && pytest
# 4. Commit and push
git add .
git commit -m "Add Payshop payment service"
git push -u origin feature/payshop-service
# 5. Open PR on GitHub
Code conventions¶
- Python >=3.9 — use
from __future__ import annotations, nevermatch/case - Decimal for money — never
float - Type annotations on all public functions
- Google style docstrings
_filename.py= internal module,filename.py= public API- No PII in logs — phone numbers, emails, NIF are automatically redacted
Security¶
To report security vulnerabilities, see SECURITY.md.
Do not open a public issue
Security vulnerabilities must be reported via private email, never in a public GitHub issue.