Skip to main content

Shared PyQt6 theme and widgets for the Build ecosystem

Project description

Build UI, a shared PyQt6 theme and widget library

Build UI

Shared PyQt6 theme and reusable widget library for the Build ecosystem — one consistent look across every Build application.

Project Telos | gather | crucible | index | forum | telos | emet | buildlang

CI version: 1.0.1 python: 3.10+ core dep: PyQt6 license: fair-source

Build UI provides a single source of truth for color and Qt stylesheet generation, plus a small set of pre-styled widgets, so every application in the Build family (Calibrate Pro, Build Color, Build Finance, Build Oracle, Build Engine) renders consistently instead of re-implementing chrome.

Quick Start

pip install build-ui
from build_ui.theme import C, STYLE
from build_ui.widgets import Card, Heading, Sidebar

app.setStyleSheet(STYLE)

card, layout = Card.with_layout()
layout.addWidget(Heading("Dashboard", level=1))

Features

  • Theme (theme.py)C, a class of hex color constants (background, surface, border, text, accent, semantic colors); create_stylesheet(c=None), which renders a full Qt stylesheet from any color class; STYLE, the pre-rendered stylesheet for the default palette.
  • Widgets (widgets.py)Card, StatusDot, Heading, Stat, NavButton, Sidebar, ToastNotification: reusable QWidget subclasses that read their colors from theme.C.

Python API

from build_ui.theme import C, STYLE, create_stylesheet
from build_ui.widgets import Card, Heading, Stat, NavButton, Sidebar, StatusDot, ToastNotification

# Apply the shared stylesheet to a QApplication
app.setStyleSheet(STYLE)

# Build a themed variant by overriding constants
class DarkC(C):
    BG = "#161616"

dark_style = create_stylesheet(DarkC)

# Compose widgets
sidebar = Sidebar(["Dashboard", "Settings"], app_name="My App")
stat = Stat("Uptime", "99.9%")
toast = ToastNotification("Saved", level="success")

Architecture

build_ui/
  theme.py     Color constants (C) + create_stylesheet() Qt stylesheet generator
  widgets.py   Card, StatusDot, Heading, Stat, NavButton, Sidebar, ToastNotification

See ARCHITECTURE.md for module responsibilities and design decisions, and USAGE.md for a full worked walkthrough.

Installation

pip install build-ui

Requires Python 3.10+ and PyQt6 (installed automatically).

License

Copyright (c) 2022-2026 Zain Dana Harper. All rights reserved. Build UI is released under the FSL-1.1-MIT: the source is available so you can read it, run it, and build on it, while competing commercial use is reserved to the Licensor to fund continued development. See 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

build_ui-1.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

build_ui-1.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file build_ui-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for build_ui-1.0.1.tar.gz
Algorithm Hash digest
SHA256 05e1eda0661b4d150b90425fde2b2686cb168113ba38bd7d83138a444e9868e5
MD5 be6c53cf55bc1b0bf92969c62bd28a21
BLAKE2b-256 727384c8bdb82f7a958fced4c493c60713544e43a1c0f1268cd6de21c6fc51de

See more details on using hashes here.

File details

Details for the file build_ui-1.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for build_ui-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caf8185b29adf6f9b3e457c9c9aa3032bdaf729317b0c7f5ddb2375a5fafdf1d
MD5 d2b2a79cc0e71143e16e42ff60b838f8
BLAKE2b-256 0848f159cd903026582df913488c043a41dd24d2bc019ed747e8a496c53bbb4e

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