Skip to main content

This is a routelit library repository for that uses uv for their dependency management.

Project description

routelit-mantine

Release Build status codecov Commit activity License

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.

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

routelit_mantine-0.1.1.tar.gz (157.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

routelit_mantine-0.1.1-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file routelit_mantine-0.1.1.tar.gz.

File metadata

  • Download URL: routelit_mantine-0.1.1.tar.gz
  • Upload date:
  • Size: 157.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for routelit_mantine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6ca5df251b6340d4063af04a1fc5ff4a72f1d3e87d86a09c0355af2febff3f9f
MD5 0be39cff84b92222548d9ac5cf65b039
BLAKE2b-256 324c715305fa53d190873668b37ae7b5602f3a44a0afaee2640aac54b92c8b50

See more details on using hashes here.

File details

Details for the file routelit_mantine-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for routelit_mantine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2f979af146d7b4da6d750a656b595f4cc3f3f9b4894067789e5b4d19a2ab36a
MD5 d925f397dc559aef4e058b1748a59a67
BLAKE2b-256 e905801e28d5762fcdb1330032da82867b69bd1c7b90af5b91cf67c847874ccd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page