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.

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.3.0.tar.gz (33.7 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.3.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for structui-0.3.0.tar.gz
Algorithm Hash digest
SHA256 21e40fae4765721ad83d5580ebc187872a33b0edd13e9938b05153955a06ab57
MD5 5e134b8cb64fdb3eceb940e89128d636
BLAKE2b-256 72d5c17becbf45e01c07539b93587f99840498f73680a124e5d96c2c86b25b9b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for structui-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88bd0ad973aeb31d21ca74872b74c4e012abfe65620ca22485ee0170cdd203f2
MD5 795b909210604d40ef523a25f75f598e
BLAKE2b-256 9519f103adfe734ca915e0ec0f755678108f1693defa6517fc38e3d582aa800a

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