Terminology

DataCanon (DC) defines a data model, equality, canonical bytes, and fingerprinting. DataSchemer (DS) applies application schemas to values in that model. SchemaCommandLine (SCL) is DS’s command-line interface builder.

Data types and values

A DataCanon Type (DCT) defines a kind of data, the information constituting its values, its validity rules, and equality. Integer, List, and Array are DCTs.

A DataCanon Instance (DCI) is a value of exactly one DCT. For example, IntegerDC(3) is a DCI of the Integer DCT. A DCI has canonical bytes and can be represented in Shorthand, YAML interchange, or supported persistence formats. The representation is separate from the value’s identity.

Conventional types are the usual types used in a programming language: builtins, library types, and user-defined classes. Python’s list, int, fractions.Fraction, and NumPy arrays are examples. A ListDC instance and a list are both Python objects but have different roles. DS preserves the DCI and converts it to conventional objects when requested.

Schemas and data

A schema definition is metadata describing permitted fields, optional DCT constraints, defaults, and other input rules. In the Python implementation, definitions are conventional dictionaries. The data supplied to the schema processor is a Mapping DCI with String field keys.

A field is a named entry governed by a schema. The Python schema API uses variables as the key containing field definitions.

A base schema supplies definitions through inheritance. A derived schema inherits and may override those definitions.

A child schema validates a nested Mapping entry in input data. Child schemas and inheritance are separate relationships. A supplied empty child Mapping is empty data for a defined schema; it is not an empty schema definition.

A projection is the validated result for one input DCI, after schema defaults have been applied. A compiled SchemaProjector can produce multiple independent SchemaProjection results. Each result retains the original input separately from processed output.