Thank you for your interest in contributing! This document explains how we work.
feature/your-feature ──PR──▶ stage ──PR──▶ master
(yours) (integration) (production)
| Branch | Purpose | Who can push directly |
|---|---|---|
master |
Production-ready code, releases | Nobody — merge from stage via PR only |
stage |
Integration / pre-release | Nobody — merge from feature branches via PR only |
For security-sensitive reports, use the process in SECURITY.md instead of a public issue.
- Never push directly to
masterorstage. - Create your branch from
stage(never from an outdatedmasterwithout syncing):git checkout stage git pull origin stage git checkout -b feature/my-feature
- Commit with clear messages (what changed and why in one line; optional scope prefix, e.g.
docs:,bench:). - Open a pull request from your branch →
stagefor integration. - CI (tests on Python 3.10–3.13 + benchmarks on PRs) must pass.
- At least one approval is required before merging to
stage, when reviewers are available. - Periodically, maintainers promote
stage→master. - Stable releases are git tags on
master(v0.2.0, …), which trigger PyPI + Docker + GitHub Releases. The PyPI version is taken from the tag (seehatch-vcsinpyproject.toml) — do not rely on editing a staticversion =inpyproject.tomlfor releases. - To automate semver tagging, add exactly one PR label:
release:patch,release:minor, orrelease:major. On merge:- to
master: createsvX.Y.Z - to
stage: createsstage-vX.Y.Z
- to
- Channel builds publish automatically:
stagepush: TestPyPI0.0.0aNvX.Y.Ztag: stable PyPI + Docker + GitHub Release
# Clone and set up
git clone https://github.com/FasterApiWeb/FasterAPI.git
cd FasterAPI
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest --cov=FasterAPI --cov-fail-under=85
# Lint and types (matches CI on Python 3.13)
ruff format --check FasterAPI tests benchmarks
ruff check FasterAPI tests benchmarks
mypy FasterAPI tests
# Multi-version tests (requires Python 3.11–3.13 on PATH)
tox
# Run benchmarks locally
pip install -e ".[benchmark]"
python benchmarks/compare.py --directBefore opening a PR, verify:
- All tests pass:
pytest --cov=FasterAPI --cov-report=term-missing --cov-fail-under=85 - No regressions in benchmark speedup ratios
- New features include tests
- Code follows existing patterns (
__slots__, type hints, no unnecessary comments)
When you open a PR to stage or master, two workflows run automatically:
- CI — Tests on Python 3.10, 3.11, 3.12, 3.13 with coverage
- Benchmark — Runs framework benchmarks and posts a comparison comment on the PR
The benchmark comment shows:
- Current req/s for FasterAPI vs FastAPI
- Speedup ratios compared to the README baseline
- 🟢 improved / ⚪ neutral / 🔴 regression indicators
A PR with a 🔴 benchmark regression will need justification before merging.
Configure these in Settings → Rules → Rulesets:
- Master ruleset
- Target:
master - Block direct pushes
- Require pull request
- Require status checks:
CI,Benchmark - Restrict allowed source branch for PRs to
stageonly
- Target:
- Stage ruleset
- Target:
stage - Block direct pushes
- Require pull request
- Require status checks:
CI,Benchmark
- Target:
Also set Settings → Actions → General so workflows can create commits/tags when needed (Read and write permissions for GITHUB_TOKEN).
- Merge
stage→mastervia PR - Choose release intent with one label on the PR:
release:patch/release:minor/release:major
- Auto-tag workflow creates the next tag on merge (or tag manually):
git checkout master git pull origin master git tag v0.x.0 git push origin v0.x.0
- The release workflow automatically:
- Runs full test suite
- Builds wheel + sdist (version = git tag, via hatch-vcs)
- Publishes to PyPI (
faster-api-web) - Pushes Docker image to
ghcr.io - Creates a GitHub Release with artifacts
- TestPyPI/PyPI require valid PEP 440 versions.
- Human-readable suffixes like
-stageare not valid upload versions on PyPI. - Channel identity is represented with valid semver segments:
stagechannel:aN- stable:
vX.Y.Z(tag-based)
The awesome-python list has strict entry rules (activity, documentation, uniqueness). When the project meets their CONTRIBUTING criteria, a maintainer can propose a PR under Web Frameworks using the PyPI name as the title:
- [faster-api-web](https://github.com/FasterApiWeb/FasterAPI) - High-performance ASGI web framework; FastAPI-like API with msgspec and radix routing.One project per PR; follow their alphabetical order and description style (ends with a period). If a submission is premature, wait until the repo satisfies Stable / Established / stars thresholds in their guide.