Skip to main content

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

Requires Python 3.11+.

pip install metaobjects

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), and runtime (a DB-API 2 ObjectManager — pg8000 / psycopg — no SQLAlchemy). Schema migrations are owned by the TypeScript meta CLI (ADR-0015); there is no migrate module in this distribution.

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.

AI assistant context

To scaffold MetaObjects context files (.metaobjects/AGENTS.md, .metaobjects/CLAUDE.md, and .claude/skills/metaobjects-*/) into your project so your AI assistant understands how to author metadata and run codegen, use the Node meta CLI:

npx meta agent-docs --server python

(Running metaobjects agent-docs in the Python CLI prints this redirect and exits.)

Links

License

Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metaobjects-1.0.0.tar.gz (808.5 kB view details)

Uploaded Source

Built Distribution

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

metaobjects-1.0.0-py3-none-any.whl (548.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metaobjects-1.0.0.tar.gz
  • Upload date:
  • Size: 808.5 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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b3e1de7b9c2217c98c40b802663c7664535e5372eba883b43868fe2cf5b0b1b6
MD5 f7b07735d8fee5d953d3576091a8a277
BLAKE2b-256 75ae1a58f9b96f44f79ea388f2f2cd441cbbe9c4b07e02b81d613a3c36394f69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: metaobjects-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 548.2 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22ef9d23c1f9a6bca842ec3b6d71068fe81d9e4e7574ec100899adcb877e0125
MD5 8cec5aeb30e3cf8ffac8b4ebc708bda3
BLAKE2b-256 d12c69e850be8838780e127cf9b18aef728f3bddc827aa0ba979d4368a6bf609

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

0.25.0

2 files

0.24.5

2 files

0.24.4

2 files

0.24.3

2 files

0.24.2

2 files

0.24.1

2 files

0.24.0

2 files

0.23.2

2 files

0.23.1

2 files

0.23.0

2 files

0.22.1

2 files

0.22.0

2 files

0.21.6

2 files

0.21.5

2 files

0.21.4

2 files

0.21.3

2 files

0.21.2

2 files

0.21.1

2 files

0.21.0

2 files

0.20.16

2 files

0.20.15

2 files

0.20.14

2 files

0.20.13

2 files

0.20.11

2 files

0.19.9

2 files

0.19.8

2 files

0.19.7

2 files

0.19.6

2 files

0.19.5

2 files

0.19.4

2 files

0.19.3

2 files

0.19.2

2 files

0.19.1

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.13

2 files

0.15.12

2 files

0.15.11

2 files

0.15.10

2 files

0.15.9

2 files

0.15.8

2 files

0.15.7

2 files

0.15.6

2 files

0.15.5

2 files

0.15.4

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page