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.0.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.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loom_ui_pkg-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7960993b8ae9d705e7d07bdd9c8cb6119efa84fec99ad27ecd3ccd7dfdb032ff
MD5 5e0da7281f9c214333a57ad169cf4e71
BLAKE2b-256 bb0263cfe043f03dc7248b906cfac74be5efb5ba5ffbe1f0931a54752cda3355

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loom_ui_pkg-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4519c5c984c739c1edfdfe3509d9fa5781233e5b2181f31d66b85f1394627a82
MD5 04dcf7275a8f5f96b726910de7b41ef4
BLAKE2b-256 6b475875c98f430557e30a33fd03ceb2c0aa977b9af58ac4786e74400983f403

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