A declarative, type-safe ,Python-Native template Rendering Framework and Meta-framework for Django.
Reason this release was yanked:
unkozn importation errors
Project description
🐘 Probo UI (mui)
A Python-Native Template Rendering Framework and Meta-framework for Django. Write Type-Safe HTML, CSS, and Logic in pure Python. No context switching. No template spaghetti.
📣 Version 1.0.0 is Live!
MUI has officially reached stable v1 status. It is a backend-first framework that transforms Python objects into performant HTML/CSS, creating a seamless bridge between Django's backend logic and the frontend interface.
📚 Read the Full Sample Documentation (v1.0)
Click the link above for deep dives into : view sample documentation
The Component Architecture: Brain (State) / Body (Elements) / Skin (Style).
Shortcuts for building complex UIs.
Probo Forms: Automatic Django Form rendering.
JIT Styling: How the CSS engine works.
⚡ Purpose & Philosophy
Traditional Django development often requires context-switching between Python (views.py) and HTML/Jinja (templates/). Logic gets split, and typos in templates cause runtime errors.
MUI solves this by bringing the Frontend into Python:
🧠 Type-Safe UI: Write HTML in Python. If your code compiles, your HTML is valid.
🎨 Just-In-Time (JIT) CSS: Styles live with components. MUI scans your active components and generates a minified CSS bundle on the fly. No unused styles.
🛡️ Logic Gates: Built-in State Management. Components automatically hide themselves if required data (like user.is_authenticated) or permissions are missing.
🔌 Django Native: Deep integration with Django Forms and Requests via the RDT (Request Data Transformer).
📦 Installation
pip install mastodon-ui
🚀 Quick Example
Here is how you build a reusable, styled component using the Flow API:
def user_card(username):
# 1. Define Logic (The Brain)
# "Look for 'name' in dynamic data. If missing, don't render."
user_id = 'User_789xyz1323'
user_info = {'practical-info':['python','javascript','docker','django']}
li_el = ElementState('li', d_state='practical-info',i_state=True, strict_dynamic=True,)
user_comp_state = ComponentState(
d_data=user_info,
li_el,
)
# 2. Build Component (Structure + Style + Data)
card = Component(
name="UserCard",
template=f"<div class='card'>{h1(username,strong(user_id))+ul(li_el.placeholder)}</div>",
# Inject Data
state=user_comp_state,
)
return card
# Render it
html= user_card("Admin").render()
print(html)
# Output:
# <div class='card'><h1>Admin<strong>User_789xyz1323</strong></h1><ul><li>python</li><li>javascript</li><li>docker</li><li>django</li></ul></div>
Project details
Release history Release notifications | RSS feed
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 probo_ui-1.1.0.tar.gz.
File metadata
- Download URL: probo_ui-1.1.0.tar.gz
- Upload date:
- Size: 479.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
869791ed70d2ead5b6265d0607c94499ff7b0a43b5074e64161bf5ae77627b22
|
|
| MD5 |
0ad70a27f1d54b2cfd9dd2cc5266114a
|
|
| BLAKE2b-256 |
0e1b88fc85404b5ea9169706bfdf272287df831e1c9d6d0329fb5cc275e04390
|
File details
Details for the file probo_ui-1.1.0-py3-none-any.whl.
File metadata
- Download URL: probo_ui-1.1.0-py3-none-any.whl
- Upload date:
- Size: 117.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a80bb1c79897494d44b79614b501e21391c61248ea7a37fdd0da152d600a59be
|
|
| MD5 |
59de3f5f0a437c05f969114b269eb98a
|
|
| BLAKE2b-256 |
2c446d928fb6043ad5294eaefeff435e8d7829b812a85968450a7068ac827756
|