Python server logic and React UI live in one .pyxl file. SSR, file routing, server actions — zero glue code.
@server
async def load(request):
return {"user": await db.get_user(request)}
export default function Page({ data }) {
return <h1>Hello, {data.user.name}</h1>
}Why Pyxle
No more context-switching between Python backend and React frontend. Pyxle unifies them in a single developer experience.
Problem
Backend + frontend
Traditional
2 repos, REST API glue, separate deploys
With Pyxle
One .pyxl file per route
Problem
Data fetching
Traditional
fetch(), loading states, error handling
With Pyxle
@server loader → data becomes React props
Problem
Server mutations
Traditional
API routes + fetch + form handling
With Pyxle
@action + useAction() — one line
Problem
Deployment
Traditional
Build frontend, deploy backend, configure CORS
With Pyxle
pyxle build && pyxle serve
One file. Full stack.
.pyxlYour async Python loader and React component live together. No API wiring, no boilerplate.
# pages/dashboard.pyxl
from pyxle.runtime import server
@server
async def load_dashboard(request):
user = await db.get_user(request.state.user_id)
stats = await db.get_stats(user.id)
return {"user": user, "stats": stats}
import React from 'react';
import { Head, Link } from 'pyxle/client';
export default function Dashboard({ data }) {
const { user, stats } = data;
return (
<main className="p-8">
<Head>
<title>Dashboard</title>
<meta name="robots" content="noindex" />
</Head>
<h1>Welcome back, {user.name}</h1>
<div className="grid grid-cols-3 gap-4">
{stats.map(s => (
<div key={s.label} className="card">
<span>{s.value}</span>
<span>{s.label}</span>
</div>
))}
</div>
<Link href="/settings">Settings</Link>
</main>
);
}
Features
Pyxle gives you the full stack in one cohesive toolkit. No glue code needed.
Drop .pyxl files into pages/ and get routes instantly. Dynamic segments, catch-all routes, layouts, and route groups.
Fetch data with @server functions on Starlette. Return a dict and it becomes React props automatically.
Every page is server-rendered then hydrated. Fast first paint, great SEO, smooth interactivity.
Instant hot module reloading via Vite. Tailwind CSS built in. Sub-second feedback loop.
Mutate data with @action decorators. Call from React via useAction() — type-safe POST handlers, zero glue code.
CSRF protection, CORS, middleware, and hashed asset builds. Deploy anywhere Python runs.
Performance
Full-stack features without the performance tax. Pyxle delivers SSR, file routing, and server actions while outperforming traditional Python frameworks.
1,100+req/s
SSR Throughput
Comparable to Next.js
20k+req/s
POST Handling
1.8x faster than FastAPI
2msp50
Latency
JSON serialization
0errors
Under Load
100 concurrent connections
Average requests/second across all API tests
Benchmarked with autocannon (10 connections, 12s). Apple M3, Python 3.13, Node.js 24. All frameworks run production configs. See full methodology and results.
Architecture
Write one file. Pyxle compiles, serves, renders, and hydrates automatically.
.pyxl File
Python + React in one file
Compiler
Splits into server + client
Starlette
Runs your Python loader
SSR + Hydrate
Full HTML, then interactive
.pyxl File
Python + React in one file
Compiler
Splits into server + client
Starlette
Runs your Python loader
SSR + Hydrate
Full HTML, then interactive
For AI coding agents
Python backend. React frontend. One file per feature. Tiny CLI surface, zero magic, grep-parseable errors. Built so Claude, Cursor, and Copilot can ship real features with a fraction of the context, files, and cross-language glue that traditional full-stack frameworks demand.
Typical stack
4–7 files
per feature. Two languages.
Pyxle
1 file
Python + JSX colocated.
Every frontier LLM has seen more Python than any other language. Your agent stays in its highest-confidence mode for the entire backend — and the entire AI SDK ecosystem (Anthropic, OpenAI, LangChain, instructor) is Python-first anyway.
Loader, mutation, and React component in a single .pyxl file. An agent reads one file to understand the whole feature — no cross-file consistency risk, no TypeScript/Python type-sync drama, no 7-file edits for a CRUD screen.
init, dev, check, build, serve. That's the whole vocabulary. Decorators set one attribute and return — no DI, no metaclass, no runtime patching. The code you see is the code that runs, which means the agent's mental model matches reality.
[section] line N: message, one file per line, exit code 0 or 1. Every diagnostic is grep-friendly. One bad file never aborts the scan, and downstream JSX cascades are suppressed automatically. Your agent's edit → check → fix loop stays tight and high-signal.
ls pages/ tells the agent every route in the project. No urls.py to maintain, no router.ts to keep in sync. The filesystem is the configuration — which means zero tokens spent reading routing files.
11 architecture deep-dives covering the parser, compiler, SSR, routing, build, runtime, and CLI. Point your agent at /docs/architecture once and it has the whole mental model — no need to grep source code to answer framework questions.
Use Cases
Build AI dashboards, internal tools, and data apps with the Python libraries you already know.
Connect your ML models directly. Load predictions in @server, visualize in React. No API layer needed.
@server
async def load(req):
predictions = model.predict(data)
return {"results": predictions}
Admin panels, CRUD apps, data viewers. Build in hours with Python, not days with separate frontend.
@action
async def approve(req):
body = await req.json()
await db.update(body["id"])
return {"ok": True}
Pandas, NumPy, scikit-learn — use your entire Python ecosystem. The UI is just React on top.
@server
async def load(req):
df = pd.read_csv("data.csv")
summary = df.describe().to_dict()
return {"stats": summary}
Get started
Install from git, scaffold a project, and start the dev server.
Install Pyxle
$ pip install pyxle-frameworkCreate a project
$ pyxle init my-app && cd my-appInstall dependencies
$ pyxle installStart building
$ pyxle devGet notified about new releases, features, and the occasional deep dive into building with Pyxle.
No spam, ever. Unsubscribe anytime.
This form is a live @action demo — powered by Pyxle.