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
- Standard, docs, and the other four ports: https://metaobjects.dev
- Source & issues: https://github.com/metaobjectsdev/metaobjects
- Full docs: https://github.com/metaobjectsdev/metaobjects/tree/main/docs
License
Apache-2.0. See LICENSE.
Release files for metaobjects 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| metaobjects-1.0.3.tar.gz | 835.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| metaobjects-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / metaobjects-1.0.3.tar.gz
| Download URL | metaobjects-1.0.3.tar.gz |
|---|---|
| Size | 835.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78cf90b57321945079bf2ce85da9d752212687d428cac019174da18daf9581bb
|
|
BLAKE2b-256 checksum How to use checksums |
1d66ab0b5f93e84c7d4671f9bb8f865b55357f0390beab53cc06362278ef0568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / metaobjects-1.0.3-py3-none-any.whl
| Download URL | metaobjects-1.0.3-py3-none-any.whl |
|---|---|
| Size | 567.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efe5cc1e601a5a968f8fbc69814220df2a126f4f1104aba91c6b842437b8ef00
|
|
BLAKE2b-256 checksum How to use checksums |
299d0084c453a5ac675d65b3ea54c790c3409f826ceed099833ea7e60cdc316a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|