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.4.0.tar.gz (34.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.4.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: structui-0.4.0.tar.gz
  • Upload date:
  • Size: 34.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.4.0.tar.gz
Algorithm Hash digest
SHA256 8df1352854c18b463485900fe32325d674c6cc3eeb883b34c18ff8dc0b7c70f8
MD5 114cf594860723a3959ca04f11110393
BLAKE2b-256 5a2b5dd52c039370f308201853acf60927d62be7679c2555464eeb4e259ceec3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: structui-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26f09515ea8b6144922ed3f2290568e21c8c3544a99dd5edb1020bc4d0b23844
MD5 b3ede840caf7ff96bea748670e07f4b3
BLAKE2b-256 c6fa26ec7be7ac43a7ede012174b7bca4c8e4bbf02de12c42f8a65b04e824207

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