Introduction
Pyxle is a Python-first full-stack web framework that brings the Next.js developer experience to the Python ecosystem. You write your server logic in Python, your UI in React, and ship them together in a single .pyxl file — no separate API layer, no second service, no glue code between them.
Status: beta (0.x) — see the changelog for the current release.
Prerequisites: Python 3.10+ (3.12 recommended) and Node.js 20.19+ with npm — Pyxle drives Vite and React under the hood. See Installation.
One file, two languages
A .pyxl file colocates a Python @server loader (and @action mutations) with the React component that renders its data. The compiler splits them apart at build time, so the Python runs on the server and the JSX runs in the browser — but you author them as one unit, because they describe one thing: a single route.
# pages/index.pyxl
from pyxle.runtime import server
@server
async def load(request):
return {"message": "Hello from Python"}export default function Home({ data }) {
return <h1>{data.message}</h1>;
}The loader's return value is the component's data prop. There's no fetch, no API route to wire up, no type contract to keep in sync — the seam between frontend and backend simply isn't there.
Why Pyxle
- No API plumbing. A
@serverloader feeds props straight into your component; an@actionis an endpoint you call withuseActioninstead of hand-writingfetch+ a route. - Real React.
npm installany React library and use it directly — Pyxle renders genuine React 19 with server-side rendering and hydration, not a Python wrapper around a component library. - Convention over configuration. File-based routing, automatic SSR, and zero config for the common cases. Run
pyxle init my-appand you're shipping. - Batteries includable. Official plugins for database, auth, and email, plus hooks for middleware, edge caching, and your own integrations.
- AI-first DX. Predictable patterns, strong types, and clear errors make Pyxle one of the easiest frameworks for an AI coding agent to ship a whole feature in a single pass. See Pyxle for AI coding agents.
Where to go next
- New here? Start with Installation, then build your first app in Quick Start.
- Want the mental model? Read
.pyxlFiles, Routing, and Data Loading. - Coming from another framework? See how Pyxle stacks up in Pyxle vs. other frameworks.
- Shipping to production? Read the Deployment guide.
- Curious how it works inside? Take the tour in the Architecture handbook.
What's new
Pyxle has grown into a depth-first full-stack framework: server-side caching, SSG & ISR, streaming SSR, realtime WebSockets (with a cross-worker Redis broker for multi-process serving), Pydantic-validated actions, observability, background tasks, image optimization, and multi-worker serving — plus serving any page as clean Markdown with an llms.txt index, so AI agents read your app as text. See the full Changelog for what shipped in each release.
- GitHub: github.com/pyxle-dev/pyxle
- Install:
pip install pyxle-framework - PyPI: pypi.org/project/pyxle-framework