Skip to content

Latest commit

 

History

History

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Apache Ossie Python Package

The Apache Ossie Python package provides Pydantic v2 models for the Apache Ossie semantic model specification. It is the shared foundation used by Apache Ossie converters to parse, construct, validate, and serialize Ossie documents from Python application.

Each OssieDocument is one semantic model: name, datasets, relationships, and metrics sit at the root alongside version. Construct documents with OssieDocument(name="sales", datasets=[...]) and access their datasets as document.datasets. JSON and YAML serialization use the same flat shape, with version serialized first when included. The former semantic_model wrapper is rejected. Unwrap old single-model documents and split multi-model documents into separate files, preserving model contents and setting version in each file before loading them.

Use OssieDocument for models embedded in ontology maps.

Load serialized documents with OssieDocument.from_ossie_yaml(text) or OssieDocument.from_ossie_json(text). Both reject duplicate mapping keys, including keys in nested objects, so an earlier value is not silently lost. The YAML loader preserves aliases, repeated merge directives and explicit overrides of merged keys.

Development

Prerequisites

  • Python 3.11 or later
  • uv >= 0.9.0

Installation

uv sync

Generating package distributions

uv build