Build reactive Python web apps with full creative control
Numerous Apps is a Python framework for building modern, reactive web applications. Create powerful apps using familiar Python patterns while maintaining complete control over your UI design.
- π Pure Python β Write your app logic in Python, no JavaScript required
- π¨ Full Creative Control β No enforced styling; use any CSS framework or custom design
- β‘ Reactive β Real-time updates via WebSocket communication
- π§© Component-Based β Built on anywidget for reusable, framework-agnostic components
- π Quick Start β Bootstrap a new app in seconds with the CLI
- π¦ Lightweight β Built on FastAPI, Uvicorn, and Jinja2
- π Authentication β Pluggable auth system with ENV or database providers
- ποΈ Multi-App Support β Combine multiple apps into a single server with shared resources
Install the framework and create your first app in seconds:
pip install numerous-apps
numerous-bootstrap my_appThis creates a new app in my_app/, installs dependencies, and starts the server at http://127.0.0.1:8000.
To run your app again:
cd my_app
python app.pyA Numerous App consists of:
| File | Purpose |
|---|---|
app.py |
Define widgets, business logic, and reactivity |
index.html.j2 |
Jinja2 template for your app layout |
static/ |
CSS, JavaScript, and images |
requirements.txt |
App dependencies |
app.py
import numerous.widgets as wi
from numerous.apps import create_app
def run_app():
counter = wi.Number(default=0, label="Counter:")
def on_click(event):
counter.value += 1
button = wi.Button(label="Click me", on_click=on_click)
return {"counter": counter, "button": button}
app = create_app(template="index.html.j2", dev=True, app_generator=run_app)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="127.0.0.1", port=8000)index.html.j2
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
</head>
<body>
<h1>Counter App</h1>
<div style="display: flex; gap: 10px; align-items: center;">
{{ counter }}
{{ button }}
</div>
</body>
</html>Numerous Apps is perfect if you:
- Want to build Python web apps with full control over styling and layout
- Need tight integration between a Python backend and reactive UI
- Prefer using standard development tools (no special IDE or notebook required)
- Want to create reusable anywidget components that work across frameworks
Use widgets from the companion numerous-widgets package, or create your own using the anywidget specification.
import numerous.widgets as wi
# Available widgets
counter = wi.Number(default=0, label="Value:")
button = wi.Button(label="Submit", on_click=handler)
dropdown = wi.DropDown(["A", "B", "C"], label="Select:")
tabs = wi.Tabs(["Tab 1", "Tab 2", "Tab 3"])
# ... and moreProtect your apps with built-in authentication. Bootstrap with auth enabled:
# Environment variable-based auth (simple)
numerous-bootstrap my_app --with-auth
# Database-based auth (SQLite)
numerous-bootstrap my_app --with-db-auth
# Export internal templates for customization
numerous-bootstrap my_app --export-templatesOr add authentication to an existing app:
from numerous.apps import create_app
from numerous.apps.auth.providers.env_auth import EnvAuthProvider
auth_provider = EnvAuthProvider()
app = create_app(
template="index.html.j2",
app_generator=run_app,
auth_provider=auth_provider,
)Configure users via environment variables:
export NUMEROUS_JWT_SECRET="your-secret-key"
export NUMEROUS_AUTH_USERS='[{"username": "admin", "password": "admin123", "is_admin": true}]'See Authentication Documentation for full details including database auth, custom providers, and security best practices.
Deploy multiple apps on a single server, each with its own authentication and configuration:
from numerous.apps import create_app, combine_apps
# Create individual apps with path prefixes
public_app = create_app(
template="public/index.html.j2",
path_prefix="/public",
app_generator=run_public_app,
)
admin_app = create_app(
template="admin/index.html.j2",
path_prefix="/admin",
app_generator=run_admin_app,
auth_provider=auth_provider,
)
# Combine into a single server
main_app = combine_apps(
apps={"/public": public_app, "/admin": admin_app},
root_redirect="/public",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(main_app, host="127.0.0.1", port=8000)See Multi-App Documentation for details on shared authentication, static files, and themes.
For detailed documentation, visit the docs or check out:
- Building from Scratch β Step-by-step guide
- Widget Reference β Available widgets and customization
- Authentication β Protect your apps with user login
- Multi-App Support β Combine multiple apps into one server
- Template Customization β Customize login pages, error screens, and more
- How It Works β Architecture overview
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Setting up your development environment
- Running tests
- Submitting pull requests
MIT License β Numerous ApS