Thanks for your interest in contributing! FastAPI-Restly is a small, opinionated framework and we welcome bug reports, fixes, docs improvements, and well-scoped feature proposals.
The project uses uv for dependency
management. Once you have uv installed:
git clone https://github.com/rjprins/fastapi-restly.git
cd fastapi-restly
make install-devThis installs the framework in editable mode along with development dependencies.
# Framework tests only (fast)
make test-framework
# Framework tests + example projects
make test-all
# Type-checking tests
make test-typing
# Run a single test file
uv run pytest tests/test_schemas.py -v
# Run a single test
uv run pytest tests/test_schemas.py::test_function_name -vTests use savepoint-based isolation, so test data does not persist between tests.
The project uses ruff for both linting and formatting:
uv run ruff check .
uv run ruff format .A pre-commit config is included; install hooks with uv run pre-commit install to run checks automatically on each commit.
# One-shot build
make docs
# Live-reload server
make docs-serve- Update relevant docs when user-facing behaviour changes; the docs build is
warning-clean and CI enforces it (
make docsruns Sphinx with-W). - One page owns each topic; other pages link to it instead of restating.
The three-tier override model is owned by
the_handle_design.md; the query grammar byhowto_query_modifiers.md; schema bases byhowto_custom_schema.md. - Link API symbols to their autodoc entry with MyST roles:
{class}`fr.AsyncRestView <fastapi_restly.views.AsyncRestView>`— prose mentions of Restly objects should be clickable, SQLAlchemy-style. External objects resolve via intersphinx (python / sqlalchemy / pydantic / fastapi). - Link to a section on another page through an explicit MyST target
(
(name)=above the heading,[text](#name)to link) — heading-slug fragments (file.md#some-heading) break silently when headings change. - Code examples in docs should be runnable as shown (or clearly marked illustrative); the landing-page teaser, tutorial listing, and Patterns entries are executed during review — keep them that way.
- Link the PR to a related issue when one exists. If no issue exists for a non-trivial change, open one first to discuss.
- Keep PRs small and focused. One logical change per PR makes review and bisecting easier.
- Add tests for new behaviour or bug fixes. Tests should fail before your change and pass after.
- Update
CHANGELOG.mdunder## [Unreleased]with a short entry under the appropriate heading (Added / Changed / Fixed / Removed). - Update relevant docs (
docs/) when user-facing behaviour changes. - Make sure
uv run ruff check .andmake test-frameworkpass locally. - Use clear commit messages. The existing log uses lightweight prefixes such
as
feat:,fix:,docs:,chore:,refactor:,test:,ci:- please follow that style.
- Code is auto-formatted by
ruff format; do not hand-format around it. - Public functions, methods, and class attributes should be type-hinted. The project supports Python 3.10+ and uses modern typing features.
- Prefer composition and small modules over deep inheritance.
- Submodules under
fastapi_restly/are organized by layer (views/,schemas/,db/,models/,query/,testing/). Keep new code in the layer it belongs to. - Internal modules are prefixed with
_(e.g._base.py,_async.py) and re-exported from package__init__.py.
Releases are cut by maintainers. The flow is:
- Move entries from
## [Unreleased]into a new dated section inCHANGELOG.md(e.g.## [0.2.0] - YYYY-MM-DD) and update the comparison links at the bottom of the file. - Bump
versioninpyproject.toml. - Commit, tag (
git tag vX.Y.Z), and push the tag. - CI publishes the release artifacts.
- Open a GitHub issue for bugs or feature ideas.
- For security issues, see
SECURITY.md- please do not open a public issue.