The fullstack Python meta-framework — sub-second startup, sub-100ms HMR
Most Python web frameworks force you to choose: backend or frontend. Nexy is the first Python meta-framework that seamlessly bridges FastAPI with Vite-powered frontends (React, Vue, Svelte, Solid) — without sacrificing DX or performance.
| You get | Instead of |
|---|---|
| Sub-second startup | Waiting 10-30s for Next.js/Rails |
One .nexy file = backend + frontend |
Separate projects for API + UI |
| Zero-config Vite integration | Manually wiring Webpack/Vite |
| Framework-agnostic UI | Being locked into one JS framework |
| SSR + SSG out of the box | Adding SSG as an afterthought |
# Create a project — no pip install needed
uvx nexy new
# Start developing
cd my-project && nexy devThat's it. Your browser opens at http://localhost:3000 with HMR, FastAPI backend, and Vite frontend — all hot-reloading on save.
One .nexy file. Server-rendered HTML + interactive frontend component.
---
title : prop[str] = "Dashboard"
from "@/components/Chart.tsx" import Chart
---
<h1>{{ title }}</h1>
<Chart data="{{ api_data }}" />The --- block is Python: declare props, import components. Below is Jinja2: server-rendered HTML. Frontend frameworks hydrate on top via Vite.
A single file format that mixes Python, Jinja2, and your UI framework of choice.
┌─────────────────────┐
│ --- │ ← Python logic (props, imports)
│ title : prop[str] │
│ --- │
│ <h1>{{ title }}</h1>│ ← Jinja2 template (SSR)
│ <Chart /> │ ← TS/JS client island
└─────────────────────┘
- File-based:
src/routes/index.nexy→/,src/routes/blog/[slug].nexy→/blog/{slug} - Modular: NestJS-inspired decorator-based routing for enterprise apps
- Hybrid: Mix static pages and dynamic API routes in the same project
Import React, Vue, Svelte, Solid, or Preact components directly into your .nexy templates. No adapter, no bridge, no configuration.
# Works in any .nexy file
from "@/components/Chart.tsx" import Chart # React/Solid/Preact
from "@/components/Table.vue" import Table # Vue
from "@/components/Card.svelte" import Card # Svelte- SSR: Server-side rendering for every component (esbuild per-file, no Vite dependency)
- SSG: Parallel static generation with worker pool
- Automatic: Framework detection from imports, zero config
| Command | Purpose |
|---|---|
nexy new |
Scaffold a new project |
nexy dev |
Dev server with HMR |
nexy build |
Production build |
nexy start |
Production server |
graph TD
A[Browser] --> B[Uvicorn / FastAPI]
B --> C{AppServer}
C --> D[Router: FBR or Modular]
C --> E[VFS: Virtual File System]
C --> F[Vite: HMR & Bundles]
D --> G[.nexy Compiler]
G --> H[Parser] --> I[AST] --> J[Jinja2] --> K[HTML]
E --> L[Module Finder/Loader]
F --> M[Frontend Frameworks]
N[Watcher] --> O[FS Events]
O --> P[compile + restart]
| Framework | Status | SSR | SSG | HMR |
|---|---|---|---|---|
| React | Stable | ✓ | ✓ | ✓ |
| Vue | Stable | ✓ | ✓ | ✓ |
| Svelte | Stable | ✓ | ✓ | ✓ |
| Solid | Stable | ✓ | ✓ | ✓ |
| Preact | Stable | ✓ | ✓ | ✓ |
| None (vanilla) | Stable | ✓ | — | ✓ |
Nexy is in active development. The core features are stable and production-ready. We welcome contributions of all kinds — bug reports, feature requests, and pull requests.
See CONTRIBUTING.md to get started, or browse good first issues.
- GitHub Issues — bug reports, feature requests
- GitHub Discussions — questions, ideas
- Documentation — full reference
- Contributor Covenant — code of conduct
Nexy is open-source software licensed under the MIT License.