Skip to content

its0x4d/fastapi-jet

Repository files navigation

FastAPI-Jet

Django's structure. FastAPI's speed.

Package version Downloads Supported Python versions Telegram

What is FastAPI-Jet?

FastAPI-Jet helps you build and manage modular, multi-app FastAPI projects with a familiar, Django-inspired workflow.

It is not a full-stack generator. It is a structure and CLI tool for teams who want clear app boundaries and commands that stay useful after day one.

Who is it for?

  • Teams outgrowing a single main.py
  • Developers coming from Django who want startproject / startapp
  • Tech leads defining a consistent FastAPI layout

Quick start

pip install fastapi-jet

# Create a project
fastjet startproject myapi
cd myapi

# Install and run (generated project is self-contained)
pip install -e ".[dev]"
fastjet runserver

Visit http://127.0.0.1:8000/docs — you'll see a /health endpoint and a sample core app at /core/.

CLI commands

Command Description
fastjet startproject <name> Create a modular project skeleton
fastjet startapp <name> Add a new app under apps/
fastjet startapp <name> --crud App with schemas, services, dependencies
fastjet startapp <name> --versioned /v1/<name> prefix pattern
fastjet startapp <name> --register Auto-add to INSTALLED_APPS (AST-safe)
fastjet runserver Run the dev server (Uvicorn)
fastjet apps List registered apps
fastjet routes Show the full route map (tags, deps)
fastjet check Validate structure, imports, and settings
fastjet shell REPL with app and settings loaded

Aliases: fastapi-jet and fastjet.

Project layout

myapi/
├── base/
│   ├── main.py       # FastAPI app + INSTALLED_APPS
│   ├── core.py       # Settings
│   └── routing.py    # Router registration (no runtime jet dependency)
├── apps/
│   └── core/         # Sample app included in new projects
├── tests/
├── pyproject.toml
└── .fastapi-jet      # Project marker

Adding a feature

fastjet startapp users
fastjet startapp billing --crud --register
fastjet startapp api --versioned

With --register, the app is added to INSTALLED_APPS in base/main.py automatically (AST-safe). Without it, the CLI prints the line to paste manually.

Register manually in base/main.py if you prefer:

INSTALLED_APPS: list[AppRoute] = [
    AppRoute(name="core", prefix="/core", tags=["core"]),
    AppRoute(name="users", prefix="/users", tags=["users"]),
]

Then inspect your API:

fastjet routes

What FastAPI-Jet is not

  • Not a "generate my entire SaaS" tool — try fastapi-forge or fastapi-spawn
  • Not zero-opinion raw FastAPI — use FastAPI directly if you want no structure
  • Not schema-first codegen — try feathers

See CONTRIBUTING.md and docs/CONVENTIONS.md for app layer structure and workflow.

Contributing

Contributions are welcome. Before opening a PR:

pip install -e .
pip install pytest ruff pre-commit
ruff check .
pytest
pre-commit run --all-files

See CONTRIBUTING.md and docs/CONVENTIONS.md for project conventions.

License

MIT — see LICENSE.

Acknowledgements

Inspired by Django's project/app model and the manage-fastapi project.

About

Managing FastAPI projects made easy.

Topics

Resources

License

Code of conduct

Contributing

Stars

37 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages