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 — reference generators you own: metaobjects eject <name> copies one into your repo), 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.)

License

Apache-2.0. See LICENSE.

Metadata

Release files for metaobjects 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaobjects 1.0.12
File Size Uploaded
metaobjects-1.0.12.tar.gz 949.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaobjects 1.0.12
File Interpreter ABI Platform
metaobjects-1.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / metaobjects-1.0.12.tar.gz

Download URL metaobjects-1.0.12.tar.gz
Size 949.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e8aa948d06ee5d29af76ab123f9507ef469f8ef7c1b7b59cbe61d1a431ab2256
BLAKE2b-256 checksum
How to use checksums
f60ba5501fe1427c65cf262c5c0dffd25a5e3a3a82b78836f74f70b02cb5f033
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / metaobjects-1.0.12-py3-none-any.whl

Download URL metaobjects-1.0.12-py3-none-any.whl
Size 622.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0382960eb31863f667e687f2f020060ba2dd70843397dc0566fd0826e362a08f
BLAKE2b-256 checksum
How to use checksums
011f6645beb087ee8493967eda136198ea6f71143fccfc9557860b7175cf59cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.0.12 This release

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.24.5

2 release files

0.24.4

2 release files

0.24.3

2 release files

0.24.2

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.2

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.6

2 release files

0.21.5

2 release files

0.19.8

2 release files

0.19.7

2 release files

0.19.6

2 release files

0.19.5

2 release files

0.19.4

2 release files

0.19.3

2 release files

0.19.2

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release 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