Skip to main content

A format-agnostic, schema-driven, hierarchical configuration UI.

Project description

StructUI

PyPI version CI CD License: MIT

StructUI is a format-agnostic, schema-driven, hierarchical configuration UI engine built in Python. Designed as a flexible architectural backbone, it parses standard configuration files (YAML, JSON, CSV, XML) and dynamically generates a live web-based property editor based on constraints and metadata defined in a schema file.

The architecture is explicitly decoupled, making it readily extensible to strict domain-specific specifications (e.g., AUTOSAR configurators) and agent-driven programmatic workflows.

Features

  • Pillar A: Format-Agnostic Parsers: cleanly separate UI generation from underlying data formats. Out-of-the-box support for YAML, JSON, and XML (including schema-driven arrays and attributes), with abstract base classes extensible to CSV and others.
  • Pillar B: Hierarchical UI: Dynamic tree-based rendering with full support for multidimensional containers, dynamic polymorphic list additions, and node mapping. Powered natively by NiceGUI.
  • Pillar C: Data Validity: Enforces schema metadata strictly at the UI layer. Missing fields gracefully populate via defaults, required flags trigger locking, and nested typings are continuously evaluated.
  • Pillar D: Extensibility & Programmatic Control: Decomposed core logic (App, Parser, State, Schema, UI) allowing external tools and wrappers (e.g. CLI, Agent Workflows) to invoke the editor or inject properties safely.
  • Hex/Decimal Toggling: Automatically detects and preserves hex formatting (0x...) loaded from YAML configurations. Supports inline format toggling between hex and decimal, with validation logic to restrict inputs to valid hex formats and enforce platform/64-bit size limits.

Installation

From PyPI (recommended)

pip install structui

From Source (development)

git clone https://github.com/MoSaeedHammad/structui.git
cd structui
pip install -e .

Quick Start

Launch the editor in the current directory against your local configuration files by simply typing:

structui --dir . --schema .structui_schema.yaml --port 8080

Testing

To run the test suite and verify code coverage, first install the necessary development dependencies:

pip install -e . pytest pytest-cov pytest-asyncio pyyaml nicegui

Then, run pytest with coverage reporting:

PYTHONPATH=src python3 -m pytest tests/ --cov=structui --cov-report=term-missing

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

structui-0.5.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

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

structui-0.5.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file structui-0.5.0.tar.gz.

File metadata

  • Download URL: structui-0.5.0.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for structui-0.5.0.tar.gz
Algorithm Hash digest
SHA256 48a402e09349e4c8234bc3d09121acf0c65a7be5d9db679e3325acd259dce15b
MD5 f08ecc1fd067ca88a00abba2f290cd03
BLAKE2b-256 855cba4a291143756d7f78c919e63b32a600e5242626a93fc9c6da4499b820dd

See more details on using hashes here.

File details

Details for the file structui-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: structui-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for structui-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f6e058e81a6947a310a255bfc3b949a48b4d490999fa693a4038066a723963d
MD5 c989d37ae4dfc9eefc6f39218baaa8af
BLAKE2b-256 3f0461f4c5243eaeec0e341ef0b87de72f3f7b3302426c7a604cd6f6d7dc2be0

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