Skip to main content

Cross-language metadata standard: declare typed entities once, generate idiomatic drift-checked code across languages — Python port.

Project description

MetaObjects (Python)

The Python port of the MetaObjects cross-language metadata standard: declare your typed entity model once, then generate idiomatic, drift-checked code across TypeScript, Java, C#, Python, and Kotlin. The metamodel is the durable spine; generated code is the disposable artifact.

Behavior is verified byte-for-byte against the same shared conformance corpora as every other language port.

Install

pip install metaobjects

Requires Python 3.11+. The only runtime dependency is PyYAML.

Quick start

Load a directory of metadata (*.json canonical or sigil-free *.yaml):

from metaobjects import load_directory

result = load_directory("metaobjects/")   # your *.json / *.yaml metadata files

if result.errors:
    for err in result.errors:
        print(err)          # structured MetaError with a stable ErrorCode
else:
    root = result.root      # the merged metadata tree (a MetaData node)
    print(root)

load_directory, load_uris, and load_string are module-level shortcuts over MetaDataLoader; all return a LoadResult with the same field shape as the other ports.

What's in the package

The primary public API is the loader (load_directory / load_uris / load_string, MetaDataLoader, LoadResult, ErrorCode, MetaError). The distribution also ships the Python implementations of the other pillars used by the CLI and tooling: codegen (Pydantic + FastAPI emit), render (Mustache + payload-VO + verify), runtime (SQLAlchemy-Core object manager), and migrate.

Authoring formats

  • Canonical JSON (*.json) — the cross-language interchange shape.
  • Sigil-free YAML (*.yaml / *.yml) — the AI-first authoring front-end (ADR-0006). Desugared to canonical JSON at load time. A directory may mix both freely.

Links

License

Apache-2.0. See LICENSE.

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

metaobjects-0.9.0.tar.gz (463.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metaobjects-0.9.0-py3-none-any.whl (343.7 kB view details)

Uploaded Python 3

File details

Details for the file metaobjects-0.9.0.tar.gz.

File metadata

  • Download URL: metaobjects-0.9.0.tar.gz
  • Upload date:
  • Size: 463.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metaobjects-0.9.0.tar.gz
Algorithm Hash digest
SHA256 5c35b401b3c3316c34ff795eb35f5ea0941b20f7498873f08ecc7a9070a3bffc
MD5 f9d0c59fbbd74c4f0ed8a106eaaa8ffb
BLAKE2b-256 79966a70befd6d5d7116f0d30bdd34269c4d4393c274bfae5bc236edaa2a2862

See more details on using hashes here.

File details

Details for the file metaobjects-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: metaobjects-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 343.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metaobjects-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a17d7d297608bb1d21bbb143c52d8e1eec126044e29ad635425e63fe5f48ef70
MD5 f5ed8a3530675c56907a67848789e8e8
BLAKE2b-256 a5658d7a1ebd206cc15bb930a0ac8012765b4aca63230313c3ff5b3c5e732712

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