Skip to main content

The Thread-Safe, State-Aware Interface that Weaves Itself.

Project description

Loom UI 🧶

Build modern, real-time Python dashboards without writing a single line of JavaScript.

Loom UI is a lightweight, zero-dependency (almost) library that lets you create interactive single-page applications (SPAs), admin panels, and data dashboards purely in Python. It handles the frontend rendering, state management, and WebSocket communication for you.

🚀 Features

  • Zero JavaScript Required: Write Python, get a React-like UI.
  • Real-Time by Default: Built on WebSockets; UI updates instantly when Python state changes.
  • Reactive State: Just change state.value = 10 and the UI updates automatically.
  • Enterprise Components: Includes Tables, Charts, Sidebars, Modals, Metrics, and Forms out of the box.
  • Zero-Flicker Engine: Smart DOM patching ensures smooth updates, even for high-frequency data.

📦 Installation

pip install loom-ui

⚡ Quick Start

Create a file app.py:

from loom import LoomApp, state
import time, threading

app = LoomApp()

# 1. Define State
state.counter = 0

# 2. Background Task (Optional)
def tick():
    while True:
        state.counter += 1
        time.sleep(1)

threading.Thread(target=tick, daemon=True).start()

# 3. Build UI
with app.Navbar(title="My Dashboard"):
    app.Text("v0.1.0")

with app.Card(title="Live Counter"):
    # The "$" tells Loom to bind to the state variable
    app.Metric(label="Seconds Running", value="$counter", color="blue")
    app.ProgressBar(value_var="counter", color="blue")

if __name__ == "__main__":
    app.run()

Run it:

python app.py

📚 Documentation

Full documentation is available in DOCS.md.

📄 License

MIT License

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

loom_ui_pkg-0.1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

loom_ui_pkg-0.1.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loom_ui_pkg-0.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for loom_ui_pkg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6ccaca6f29b3caa760024a308db5636af67cf1e3b275d3e14c13dafda2f27469
MD5 9030d834ad4f49a2a771b58ff7d93b25
BLAKE2b-256 783906c2a247c3f773fe04bef7667035032e2673186d48891b738120fa577dad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loom_ui_pkg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for loom_ui_pkg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 127a38553ae2a7ebcf2e69527021bb2f60f211866758a112835b79ad6848c0e5
MD5 fd71e78412865f4a31528fdf43665924
BLAKE2b-256 e8f063ac26f8b4e192e18fe08c2ed28c84dbd6cf94e913fe8b26e0724e80363c

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