<!-- Pyxle · Markdown for AI agents -->
> This is the Markdown rendition of https://pyxle.dev/docs/getting-started/introduction, served for AI agents and assistants.
> Append `.md` to any pyxle.dev URL to fetch its Markdown; the links below already do.
> Index of every page: https://pyxle.dev/llms.txt · Whole docs in one file: https://pyxle.dev/llms-full.txt
> Search the docs: https://pyxle.dev/api/docs-search?q=YOUR+QUERY (returns matching pages as Markdown links)

# 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](https://pyxle.dev/docs/changelog.md) 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](https://pyxle.dev/docs/getting-started/installation.md).

## 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.

```pyxl
# 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 `@server` loader feeds props straight into your component; an `@action` is an endpoint you call with `useAction` instead of hand-writing `fetch` + a route.
- **Real React.** `npm install` any 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-app` and you're shipping.
- **Batteries includable.** Official plugins for [database](https://pyxle.dev/docs/plugins/pyxle-db.md), [auth](https://pyxle.dev/docs/plugins/pyxle-auth.md), and [email](https://pyxle.dev/docs/plugins/pyxle-mail.md), 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](https://pyxle.dev/docs/guides/for-ai-agents.md).

## Where to go next

- **New here?** Start with [Installation](https://pyxle.dev/docs/getting-started/installation.md), then build your first app in [Quick Start](https://pyxle.dev/docs/getting-started/quick-start.md).
- **Want the mental model?** Read [`.pyxl` Files](https://pyxle.dev/docs/core-concepts/pyxl-files.md), [Routing](https://pyxle.dev/docs/core-concepts/routing.md), and [Data Loading](https://pyxle.dev/docs/core-concepts/data-loading.md).
- **Coming from another framework?** See how Pyxle stacks up in [Pyxle vs. other frameworks](https://pyxle.dev/docs/guides/comparison.md).
- **Shipping to production?** Read the [Deployment](https://pyxle.dev/docs/guides/deployment.md) guide.
- **Curious how it works inside?** Take the tour in the [Architecture handbook](https://pyxle.dev/docs/architecture/README.md).

## 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](https://pyxle.dev/docs/changelog.md) for what shipped in each release.

---

- GitHub: [github.com/pyxle-dev/pyxle](https://github.com/pyxle-dev/pyxle)
- Install: `pip install pyxle-framework`
- PyPI: [pypi.org/project/pyxle-framework](https://pypi.org/project/pyxle-framework/)

## Continue reading

- Next: [Installation](https://pyxle.dev/docs/getting-started/installation.md)

---
> Human (HTML) version of this page: https://pyxle.dev/docs/getting-started/introduction
> Keep exploring: https://pyxle.dev/llms.txt (index) · https://pyxle.dev/llms-full.txt (everything) · https://pyxle.dev/api/docs-search?q= (search)
