The Python full-stack framework.
Server logic in Python. UI in React. One file.
# pages/index.pyxl
@server
async def load(request):
return {"message": "Hello from Python"}
# --- JSX ---
export default function Home({ data }) {
return <h1>{data.message}</h1>;
}Pyxle compiles .pyxl files into Python server modules and React client components.
@server loaders run on the backend, SSR renders the HTML, React hydrates on the client.
pip install pyxle-framework
pyxle init my-app && cd my-app
pyxle install
pyxle devOpen http://localhost:8000.
.pyxl files -- Python + React in a single file, split at compile time
File-based routing -- pages/ maps to URLs, dynamic segments with [param].pyxl
SSR -- Server-side rendering via esbuild + React 18
@server / @action -- Typed data loading and form mutations
Layouts -- Nested layouts and templates with slot composition
Vite HMR -- Fast refresh in development
Tailwind -- Pre-configured out of the box
Production build -- pyxle build + pyxle serve for deployment
Full docs at pyxle.dev/docs:
- Installation
- Quick Start
.pyxlFiles- Routing
- Data Loading
- Server Actions
- Layouts
- Deployment
- CLI Reference
- Configuration
pyxle init <name> Scaffold a new project
pyxle install Install Python + Node dependencies
pyxle dev Development server with HMR
pyxle build Production build
pyxle serve Serve the production build
Python 3.10+ and Node.js 18+.
git clone https://github.com/pyxle-framework/pyxle.git
cd pyxle
pip install -e ".[dev]"
pytest