RouteLit Silicon is a Python library that extends RouteLit Builder with pre-built UI components and layouts.
Project description
routelit-silicon
RouteLit Silicon is a Python library that extends RouteLit Builder with pre-built UI components and layouts. It provides a showcase of how to create web applications with common UI patterns like sidebars, footers, and other structural elements.
The library currently includes:
- A components builder that supports sidebar layouts
- Integration with silicon.css for styling
- Easy configuration of UI structure through a builder pattern
- Static asset management for frontend resources
Installation
pip install routelit-silicon
Usage
from flask import Flask
from routelit import RouteLit
from routelit_flask import RouteLitFlaskAdapter
from routelit_silicon import RLBuilder
app = Flask(__name__)
routelit = RouteLit(BuilderClass=RLBuilder)
routelit_adapter = RouteLitFlaskAdapter(
routelit,
### TO USE LOCAL VITE DEV SERVER, UNCOMMENT THE FOLLOWING LINES
# run_mode="dev_components",
# local_components_server="http://localhost:5173"
).configure(app)
def view(ui: RLBuilder):
ui.set_config(use_sidebar=True)
with ui.sidebar:
ui.title("Sidebar")
ui.title("Main")
ui.text("Hello, world! from main")
ui.sidebar.text("Hello, world! from sidebar")
@app.route("/", methods=["GET", "POST"])
def index():
return routelit_adapter.response(view)
if __name__ == "__main__":
app.run(debug=True)
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_silicon-0.1.0.tar.gz.
File metadata
- Download URL: routelit_silicon-0.1.0.tar.gz
- Upload date:
- Size: 109.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7f6ba16f2dbc4c728843d10f545ce115e8d8885f3351ea64bbad82aad11df2c
|
|
| MD5 |
e77144548b6e7c001fe35d309c9f8e23
|
|
| BLAKE2b-256 |
800747605d98bffda4a14b52d3ab4e16cd53ef464740ecae9778652bf23b628d
|
File details
Details for the file routelit_silicon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: routelit_silicon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e9e0846ad2aa7848211d1c79d381d8e7363559cdaaf1bbd3d30dc460568c9ac
|
|
| MD5 |
aeab243b2d47e0e1dc21cae7b1eac399
|
|
| BLAKE2b-256 |
1d1359ebf820ae2236b1ef26dc4f65fb30504efe9b857a92ea8d0ad215ecdab5
|