Metadata-Version: 2.5
Name: fastogram
Version: 0.1.0
Summary: A Laravel-style web framework for Python: FastAPI + Inertia.js + an artisan-like CLI
Author-email: Abubeker Afdel <ibnuafdel@gmail.com>
License: MIT
Requires-Python: >=3.12
Requires-Dist: aiosmtplib>=5.1
Requires-Dist: aiosqlite>=0.22
Requires-Dist: alembic>=1.20
Requires-Dist: croniter<7,>=6.2
Requires-Dist: cryptography>=50
Requires-Dist: faker>=40
Requires-Dist: fastapi<0.144,>=0.143
Requires-Dist: httpx2>=2.13
Requires-Dist: inflect>=7.5
Requires-Dist: itsdangerous>=2.2
Requires-Dist: jinja2>=3.1.6
Requires-Dist: pwdlib[argon2]>=0.3.1
Requires-Dist: pydantic[email]<2.15,>=2.14
Requires-Dist: python-dotenv>=1.2.4
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: sqlalchemy[asyncio]<2.2,>=2.1.4
Requires-Dist: starlette<1.8,>=1.7
Requires-Dist: typer<0.28,>=0.27
Requires-Dist: uvicorn[standard]>=0.54
Requires-Dist: watchfiles>=1.0
Provides-Extra: mysql
Requires-Dist: asyncmy>=0.2.16; extra == 'mysql'
Provides-Extra: pgsql
Requires-Dist: asyncpg>=0.32; extra == 'pgsql'
Provides-Extra: redis
Requires-Dist: redis>=8.1; extra == 'redis'
Requires-Dist: taskiq-redis>=1.2.4; extra == 'redis'
Requires-Dist: taskiq>=0.13; extra == 'redis'
Provides-Extra: testing
Requires-Dist: pytest-asyncio<1.5,>=1.4; extra == 'testing'
Requires-Dist: pytest>=9.1; extra == 'testing'
Description-Content-Type: text/markdown

# FastoGram

A Laravel-style web framework for Python: **FastAPI** on the backend, **Inertia.js v3 + React**
on the frontend, and an artisan-like CLI (`fastogram make:controller`, `fastogram migrate`, ...).

> **Status: early (0.1.0).** It works end to end, but expect rough edges and breaking changes.
> The previous Telegram bot template (0.0.x, FastAPI + aiogram) is kept under the tag
> `legacy-telegram-template` and on the `release/public-ready` branch.

## Try it

You need [uv](https://docs.astral.sh/uv/), Node 22+ and npm.

```bash
uvx fastogram new myapp     # like `laravel new myapp`
cd myapp
uv run fastogram dev        # server + Vite + route watcher
```

Open http://127.0.0.1:8000, register, and you're in the React starter kit (dashboard, settings,
password reset, email verification). In local mode mail goes to `storage/logs/`.

Useful commands: `fastogram list`, `fastogram route:list`, `fastogram make:model Post -mcr`,
`fastogram migrate`, `uv run pytest`.

## What it looks like

```python
# routes/web.py
with Route.middleware("auth").group():
    Route.get("/posts", [PostController, "index"]).name("posts.index")
    Route.post("/posts", [PostController, "store"]).name("posts.store")

# app/http/controllers/post_controller.py
class PostController(Controller):
    async def index(self):
        return inertia("posts/index", {"posts": await Post.with_("author").latest().paginate(15)})

    async def store(self, form: StorePostRequest):
        await Post.create(**form.validated(), user_id=auth().id())
        return redirect().route("posts.index").with_flash("success", "Post created.")
```

## Repository layout

```
src/fastogram/   the framework library and CLI (published to PyPI as `fastogram`)
skeleton/        the app that `fastogram new` creates (like laravel/laravel)
tests/           the framework's own tests
spikes/          Phase 0 proof-of-concept spikes (throwaway)
```

## License

MIT
