The Python-Native Frontend Framework
v1 coming soon! Evolve is actively evolving - polishing the reactive engine & browser kernel before final release.
Build high-performance, reactive web applications entirely in Python.
Powered by Pyodide (WASM) and a fine-grained Solid.js-style reactive engine.
- β‘ Zero Virtual DOM: Uses fine-grained signals for direct DOM updates (O(1) complexity).
- π Python Native: Write components, routing, and logic in pure Python.
- π¦ Tiny Bundle: A minimal JS kernel coupled with an optimized Python environment.
- π Static Deployment: Builds to pure HTML/CSS/WASM. Deploy to Vercel, Netlify, or GitHub Pages.
Evolve is a paradigm shift for Python web development. Unlike traditional frameworks that render HTML on the server (Django, Flask) or wrap heavy JS runtimes, Evolve runs natively in the browser via WebAssembly.
It features a radical 2KB JavaScript micro-kernel that handles DOM operations, while your application logic, state management, and component rendering happen entirely in Python.
Requires Python 3.14+.
pip install evolveGet a reactive app running in seconds using the CLI.
evolve init my-app
cd my-appevolve runVisit http://localhost:3000 to see your app.
evolve buildThis compiles your Python code and assets into the dist/ folder, ready for static hosting.
Evolve uses a functional component syntax inspired by React but powered by Python.
pages/home.py:
from evolve.router.router import page
from evolve.src.html import div, h1, button, p
from evolve.reactive.reactive import signal
@page("/")
def Home():
# Reactive state (Signals)
count = signal(0)
def increment():
count.set(count() + 1)
return div(
h1("Welcome to Evolve π§¬"),
p(f"Current count is: {count()}"),
button("Increment", on_click=lambda: increment()),
style={"text-align": "center", "font-family": "sans-serif"}
)Evolve doesn't re-render entire components. When a signal changes, only the specific text node or attribute bound to it updates.
from evolve.reactive.reactive import signal, computed
count = signal(0)
double = computed(lambda: count() * 2)
# Only this text node updates in the DOM
span(f"Double is: {double()}") A lightweight, history-mode router is included out of the box.
from evolve.router.router import page, Link
@page("/about")
def About():
return div(
h1("About Us"),
Link("Go Home", to="/")
)Evolve includes a tw() utility for rapid styling without leaving Python.
from evolve.src.html import div, tw
div("Hello", **tw("text-white bg-blue-500 p-4 rounded-lg flex justify-center"))Hook into mount and unmount events for side effects (API calls, subscriptions).
from evolve.components.component import component
from evolve.core.lifecycle import on_mount, on_cleanup
@component
def Timer():
on_mount(lambda: print("Component mounted!"))
on_cleanup(lambda: print("Cleaned up!"))
return div("Timer Component")Evolve bridges the gap between Python and the Browser DOM using a highly efficient architecture:
flowchart TD
subgraph Browser ["Browser (WASM Context)"]
direction TB
App[Your App.py] --> Reactive[Reactive Engine]
Reactive --> Diff[Diff Engine]
Diff --> Patch[Patch List]
end
subgraph Kernel ["JS Micro-Kernel"]
Bridge[Pyodide Bridge]
RealDOM[Real DOM]
end
Patch -- "Serialized Ops" --> Bridge
Bridge --> RealDOM
RealDOM -- "Events" --> App
- Python Layer: Calculates changes using Signals.
- Diff Engine: Generates a minimal list of DOM operations (patches).
- JS Kernel: A tiny JavaScript layer receives patches and applies them to the real DOM.
When you run evolve init, the following structure is created:
my-app/
βββ components/ # Reusable UI components
βββ pages/ # Route handlers (@page)
βββ public/ # Static assets (images, fonts)
βββ evolve.zip # Packed engine (generated on build)
βββ app.py # Entry point (auto-generated)
- v0.1: Core Reactive Engine & JS Kernel
- v0.1: Component System & Routing
- v0.1: CLI (
init,build,run) - v0.2: Global State Management (Store)
- v0.3: Form Handling & Validation
- v0.4: Server-Side Rendering (SSR) capabilities
- v1.0: Full WASM Component Model Support
We welcome contributions! Please see our Contributing Guide for details on how to set up the development environment.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request