This is a routelit library repository for that uses uv for their dependency management.
Project description
routelit-mantine
This is a routelit library that provides a Python builder API that maps to a React client powered by Mantine components. You describe UI declaratively in Python; RouteLit streams diffs to the browser where Mantine renders beautiful, accessible components.
- Github repository: https://github.com/routelit/routelit-mantine/
- Documentation https://routelit.github.io/routelit-mantine/
Features
- Rich Mantine components exposed in Python
- Inputs: checkbox, chip, text input, number input, password input, selects, tags, sliders, rating, switches, groups
- Layouts: container, grid, flex, group, stack, simple grid, space, app shell, scroll areas, paper/box
- Navigation: anchors, tabs, nav links, sidebar
- Feedback and overlays: alerts, notifications, dialogs, drawers, affix, spoiler
- Data display and charts: tables, images, formatters, area/line/bar/pie/donut/radar/scatter/bubble/radial bar/sparkline/heatmap
- Server-driven model with a clean builder
RLBuilder - Flask adapter for easy integration (
routelit-flask)
Getting started with your project
to install the library, run:
pip install routelit-mantine
# or
uv add routelit-mantine
Quickstart (Flask)
from flask import Flask, Response
from routelit import RouteLit
from routelit_flask import RouteLitFlaskAdapter
from routelit_mantine import RLBuilder
app = Flask(__name__)
rl = RouteLit(BuilderClass=RLBuilder)
adapter = RouteLitFlaskAdapter(rl).configure(app)
def index_view(ui: RLBuilder) -> None:
ui.set_page_config(page_title="Home")
ui.title("Mantine RouteLit")
ui.text("Hello from Python 👋")
if ui.button("Click me"):
ui.notification("Clicked!", color="green")
@app.route("/", methods=["GET", "POST"])
def index() -> Response:
return adapter.stream_response(index_view)
if __name__ == "__main__":
app.run(debug=True)
License
Apache 2.0
Author: rolangom
Repository initiated with fpgmaas/cookiecutter-uv.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file routelit_mantine-0.1.4.tar.gz.
File metadata
- Download URL: routelit_mantine-0.1.4.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea386829fc8d62be8750dcec36f602beea5c63224f5de0c4d1c50385a378f01
|
|
| MD5 |
798f2c3af28c8d24d959b6f501ad0acc
|
|
| BLAKE2b-256 |
bb7521f93a31ec02ed59898c78a3449ed12f2a26606e2776d670e9f6992c0570
|
File details
Details for the file routelit_mantine-0.1.4-py3-none-any.whl.
File metadata
- Download URL: routelit_mantine-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd80a383f3d94b941dea1050d5cc7d81ddee06921f64a6a1173e9008ef79f138
|
|
| MD5 |
60110cdc1cf0979b952f0cfd40e03517
|
|
| BLAKE2b-256 |
a480cfb8391841a3bc45e77bc8470c43126f47b2e9aca2318a169887b1020ce8
|