Documentation

DataSchemer (DS) is a lightweight, schema-driven library for parsing, validating, and typing structured user input into clean, well-defined Python data structures.

DS is designed to sit at the boundary between user-facing interfaces (command-line tools, configuration files, simple APIs) and internal application logic. Schemas describe what data is expected and how it should be interpreted; DS handles type coercion, validation, defaults, and structural mapping in a consistent, reusable way. DS can naturally be employed within a simple script requiring user input, or a substantial software suite with a deep command line interface.

Key ideas include:

  • Declarative schemas expressed as plain Python dictionaries, with support for reuse and extension via inheritance.
  • Strict, predictable parsing, with optional support for simple mathematical expressions (basic arithmetic), evaluated explicitly and safely.
  • First-class CLI integration, including help text, validation, and tab completion
  • Minimal assumptions, making the core a useful utility independent of CLI applications.

DataSchemer serves as the backbone for user input in the Principia Materia software suite, but DS is a standalone utility that should be useful in other applications.

Citation

If DataSchemer is used in published academic work, please cite it. A recommended citation is provided in CITATION.cff (see repository).


Last modified January 20, 2026: touch to rebuild. (4d4e329)