Metadata-Version: 2.2
Name: fapilot
Version: 0.1.0
Summary: A Django-inspired async application framework built on FastAPI, Tortoise ORM, and Aerich.
Author: Ali Hajiali
Maintainer: Ali Hajiali
License: MIT
Project-URL: Homepage, https://github.com/alihajiali/fapilot
Project-URL: Repository, https://github.com/alihajiali/fapilot
Project-URL: Issues, https://github.com/alihajiali/fapilot/issues
Project-URL: Changelog, https://github.com/alihajiali/fapilot/blob/main/CHANGELOG.md
Keywords: fastapi,async,framework,tortoise-orm,aerich,django-inspired
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi<0.142,>=0.141
Requires-Dist: starlette<0.50,>=0.49
Requires-Dist: pydantic<3,>=2.12
Requires-Dist: pydantic-settings<3,>=2.10
Requires-Dist: tortoise-orm[asyncpg]<1.2,>=1.1
Requires-Dist: aerich[toml]<0.11,>=0.10
Requires-Dist: uvicorn[standard]<0.36,>=0.35
Requires-Dist: python-jose<4,>=3.5
Requires-Dist: passlib[bcrypt]<2,>=1.7
Requires-Dist: python-multipart<0.0.21,>=0.0.20
Provides-Extra: dev
Requires-Dist: build<2,>=1.3; extra == "dev"
Requires-Dist: pytest<9,>=8.4; extra == "dev"
Requires-Dist: pytest-anyio>=0.0.0; extra == "dev"
Requires-Dist: httpx<0.29,>=0.28; extra == "dev"
Requires-Dist: ruff<0.13,>=0.12; extra == "dev"
Requires-Dist: pyright<2,>=1.1; extra == "dev"
Requires-Dist: twine<7,>=6.2; extra == "dev"

# Fapilot

Fapilot is an opinionated, async-first backend framework built on FastAPI. It borrows Django's project organization, app registry, settings discipline, scaffolding, and management-command ergonomics while keeping FastAPI's dependency injection, OpenAPI, lifespan, and async runtime model.

## Features

- Django-inspired project and app scaffolding.
- FastAPI application factory with app registry integration.
- Pydantic settings loader with uppercase application settings.
- Tortoise ORM configuration and Aerich migration backend.
- Pagination, filtering, CRUD, permissions, middleware, events, auth, and realtime helpers.
- CLI commands for project creation, app creation, migrations, and local serving.

## Installation

For local development from this repository:

```bash
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
```

After installation, the `fapilot` command is available on your shell path:

```bash
fapilot --help
```

You can also run the CLI directly from a checkout:

```bash
python3.12 -m fapilot.cli --help
```

## Quick Start

```bash
python3.12 -m pip install -e .
fapilot startproject myproject
cd myproject
fapilot startapp users
fapilot makemigrations
fapilot migrate
fapilot runserver
```

Core stack:

- FastAPI + Starlette lifespan
- Pydantic v2 + pydantic-settings
- Tortoise ORM
- Aerich migrations through a backend abstraction
- Uvicorn
- pytest, HTTPX, AnyIO
- Ruff and Pyright

This repository contains the reusable framework package. Generated projects contain `config/`, `apps/`, `common/`, `manage.py`, Docker files, `.env`, and a project-local `pyproject.toml`.

## CLI

```bash
fapilot startproject myproject
fapilot startapp users
fapilot makemigrations --name initial
fapilot migrate
fapilot runserver --host 127.0.0.1 --port 8000
```

## Development

```bash
ruff check .
pyright
pytest
python -m build
twine check dist/*
```

## Release

See [RELEASE.md](RELEASE.md) for the release checklist and PyPI publishing flow.

## License

Fapilot is released under the MIT License. See [LICENSE](LICENSE).
