Skip to main content

Astris

The modern full-stack web framework for Python.
Full-stack simplicity with modern Python performance.

Documentation PyPI version Python Versions License

⚠️ Early Alpha: Astris is currently in active alpha development. APIs and features may undergo breaking changes until production-ready status is confirmed. Feedback, bug reports, and ideas are welcome!


What is Astris?

Astris bridges the gap between the rapid, joyful developer experience of classic full-stack frameworks (like Laravel and Rails) and the raw performance, modern typing, and async concurrency of FastAPI and Python 3.11+.

By combining FastAPI, Inertia.js, Vue 3, Tailwind CSS v4, and SQLModel, Astris lets you build rich, dynamic single-page applications without the overhead of maintaining separate API layers or complex state synchronization.

📖 Explore the full documentation, guides, and tutorials at astris.dev.


🌟 Key Features

  • ⚡ Lightning-Fast Core: ASGI performance powered by FastAPI and Uvicorn with auto-generated OpenAPI & Swagger documentation.
  • 🧩 Modern Monolith with Inertia.js: Render Vue 3 components directly from FastAPI controllers with full server-side state hydration and zero REST boilerplate.
  • 🛡️ Production-Ready Authentication: Cryptographically signed cookie sessions, OWASP-standard Argon2id password hashing (pwdlib), and full-stack auth starter kit.
  • 🗄️ SQLModel & Alembic Database Engine: Unified declarative models, DTOs, and automatic schema migrations out-of-the-box.
  • ⚙️ Type-Safe Centralized Configuration: Powered by pydantic-settings for .env management, type casting, and fail-fast startup validation.
  • 🪐 Orbit CLI: An artisan developer CLI for scaffolding modules, generating migrations, and serving full-stack applications with hot-reloading.
  • 🎨 Tailwind CSS v4 Pre-configured: Instant zero-config styling powered by @tailwindcss/vite.

🚀 Quickstart

Create a new full-stack Astris application in seconds using uvx (or pipx):

# 1. Create a new project
uvx --from astris-python astris new my_app

# Or install globally as a CLI tool:
# uv tool install astris-python
# astris new my_app

# 2. Enter directory and install frontend dependencies
cd my_app
npm install

# 3. Start full-stack development server (FastAPI + Vite HMR)
uv run orbit serve

Open http://localhost:8000 in your browser. Your full-stack app with authentication, Inertia.js, and SQLite is live!


💡 How It Feels

1. Controllers & Inertia Rendering

Write clean, expressive controllers that return frontend views or JSON seamlessly:

from astris.auth import AuthUser, auth_required
from astris.inertia import InertiaResponse
from astris.routing import Controller

controller = Controller(prefix="/dashboard", dependencies=[auth_required])


@controller.get("/")
async def dashboard_page(request: Request, user: AuthUser) -> InertiaResponse:
    # Props are passed directly to Vue 3 with $page.props
    return InertiaResponse(request, "Dashboard", props={"username": user["name"]})

2. Unified SQLModel Models

Define database tables and validation schemas in a single declarative model:

from astris.database import Field, SQLModel


class ArticleBase(SQLModel):
    title: str = Field(index=True)
    content: str
    is_published: bool = Field(default=False)


class Article(ArticleBase, table=True):
    id: int | None = Field(default=None, primary_key=True)


class ArticleCreate(ArticleBase):
    pass

3. Frontend Views (Vue 3 + Inertia)

Build dynamic reactive pages without configuring client-side routers:

<script setup lang="ts">
import { Head, Link } from '@inertiajs/vue3'

defineProps<{
  username: string
}>()
</script>

<template>
  <Head title="Dashboard" />
  <div class="min-h-screen bg-slate-950 text-slate-100 p-8">
    <h1 class="text-3xl font-bold">Welcome back, {{ username }}!</h1>
  </div>
</template>

🪐 The Orbit CLI

Astris comes equipped with Orbit, a developer toolkit for rapid development:

# Start FastAPI backend + Vite frontend concurrently
uv run orbit serve

# Scaffold a new domain module (controller, service, model)
uv run orbit make:module billing

# Create and apply database migrations
uv run orbit make:migration "create_billing_table"
uv run orbit migrate

# Generate encryption keys
uv run orbit key:generate

📂 Project Architecture

Astris structures projects with a modular, Domain-Driven Design that grows gracefully:

my_app/
├── app/
│   ├── core/
│   │   └── config.py        # Centralized Pydantic settings & .env loading
│   └── modules/
│       ├── auth/            # Authentication domain (controller, service, model)
│       └── welcome/         # Welcome domain
├── database/
│   └── migrations/          # Alembic database migration versions
├── resources/
│   ├── css/
│   │   └── app.css          # Tailwind CSS v4 styling
│   ├── js/
│   │   ├── Pages/           # Inertia Vue 3 views & components
│   │   └── app.ts           # Vue entrypoint
│   └── views/
│       └── root.html        # HTML shell template
├── .env                     # App configuration & APP_KEY
└── pyproject.toml           # Python dependencies

🙏 Acknowledgments

Astris is built upon the work of giants. Huge gratitude to the incredible open-source projects and creators that make Astris possible:


📄 License

The Astris framework is open source and licensed under the terms of the MIT license.

Built with ❤️ by Felix Gomez.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astris_python-0.1.1.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astris_python-0.1.1-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

Details for the file astris_python-0.1.1.tar.gz.

File metadata

  • Download URL: astris_python-0.1.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for astris_python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a92d0c7340e1d8a53f7aac384339462eeee04c5d3f85d2bdc6cd6a25c703945
MD5 e30f45369d9ed790ff39afd1218b8849
BLAKE2b-256 65bf9d3f1ce9da30817f803655249d92aaebbadbe37741175fd12150f68861d3

See more details on using hashes here.

File details

Details for the file astris_python-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: astris_python-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 53.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for astris_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2561652cb84b54608b6b23b6aeb188e017b293ade5c9ada4b8b1a97f292cae06
MD5 5a7c20cda21ab4e20ca575ad52195625
BLAKE2b-256 6a28c0c5e7e67b8180615f5e1202b57cf464e50aceaa33ad304ed98ceb9e7032

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page