Skip to main content

Irides Enrichment (irides-enrichment)

Satellite package for Irides that enriches database table metadata (database/*) and database.md overview files with base preformatters, bidirectional path-qualified wikilinks ([[path|alias]]), PK/FK linking, and optional AI inference & TL;DRs.

Features

  • Base preformatter & wikilinks: Ensures standalone Markdown files include normalized YAML frontmatter and base instance/schema wikilinks without overwriting manual governance/notes.
  • Same-instance PK/FK graph linking: Connects explicit foreign keys and heuristic implicit foreign keys (customer_id -> customers.id) within each (config, instance) scope.
  • Opt-in AI relationship & TL;DR discovery (--use-ai): Discovers missed implicit FKs, deduces missed database.md ↔ catalog links, and writes concise TL;DR summaries (strictly validated against real catalog tables).
  • database.md catalog correlation: Links repository database.md files (both Prism catalog records and standalone manifests/Markdown) to DB catalog tables and adds reverse used_by backlinks on those tables.
  • Dual-mode persistence:
    • For catalog records: saves into canonical JSON (FileMetadataStore.save_table_enrichment / save_prism_enrichment) and regenerates Markdown + OKF v0.2 via FileArtifactStore.
    • For standalone .md files: inserts/updates frontmatter and idempotent <!-- irides:enrichment:start --> sections in-place.

Installation

pip install irides-enrichment
# With AI support (LiteLLM):
pip install "irides-enrichment[ai]"
# Or together with Irides CLI (`irides enrich`):
pip install "irides-cli[enrichment]"

Usage

# Enrich the entire Irides catalog (STORAGE_METADATA_DIR + STORAGE_EXPORT_DIR)
irides-enrichment
# or via the unified CLI:
irides enrich

# Also include standalone Markdown / database.md files
irides enrich ./examples/sqlite_demo ./services/checkout/database.md

# Enable AI implicit FK discovery + TL;DR
irides enrich --use-ai

# Dry-run preview
irides enrich --dry-run

CLI Options Reference (irides-enrichment / irides enrich)

Flag / Argument Description
paths (positional) Optional standalone Markdown files or directories (including database.md files)
--metadata-dir Override STORAGE_METADATA_DIR for canonical Irides JSON catalog
--export-dir Override STORAGE_EXPORT_DIR for Markdown/OKF catalog exports
--config, --target Filter catalog DB tables by target config name
--instance Filter catalog DB tables by instance name
--no-database Skip enriching catalog/standalone DB table docs
--no-database-md Skip enriching Prism/standalone database.md docs
--use-ai Enable opt-in LLM inference for implicit PK/FKs, missed links, and TL;DR
--ai-model Override LITELLM_MODEL for enrichment AI pass
--dry-run Compute enrichment and wikilinks without modifying files
--no-export-markdown Disable derived Markdown export updates
--no-export-okf Disable derived OKF v0.2 export updates
--no-preformat Export full DB table metadata instead of essential deterministic records

End-to-End Cycle (describe → prism → enrich)

export STORAGE_METADATA_DIR=/tmp/irides_demo/metadata
export STORAGE_EXPORT_DIR=/tmp/irides_demo/exports

python3 examples/sqlite_demo/setup_demo.py
irides -c examples/sqlite_demo/irides.yaml describe --target demo_sqlite
irides prism examples/sqlite_demo --output-dir /tmp/irides_demo/prism
irides enrich --dry-run
irides enrich

Python Plugin & Library Usage

from irides_core import load_plugin
from irides_enrichment import EnrichmentOptions, run_enrichment

# Direct import
report = run_enrichment(EnrichmentOptions(use_ai=False))

# Or via irides-core plugin registry (`irides.plugins`)
plugin = load_plugin("enrichment")
report = plugin.run({"use_ai": False})

Async Platform Integration

For asynchronous enrichment runs triggered via REST API (POST /api/v1/enrichment/run) or MCP (enqueue_enrichment), see services/worker_enrichment/README.md, services/api/README.md, and infra/README.md.

Metadata

Release files for irides-enrichment 0.2.0

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

Source distribution (sdist)

Source distribution for irides-enrichment 0.2.0
File Size Uploaded Provenance Actions
irides_enrichment-0.2.0.tar.gz 22.8 kB Without provenance Details for irides_enrichment-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for irides-enrichment 0.2.0
File Interpreter ABI Platform Actions
irides_enrichment-0.2.0-py3-none-any.whl Python 3 none any Details for irides_enrichment-0.2.0-py3-none-any.whl

Total release size: 48.4 kB

Release files / irides_enrichment-0.2.0.tar.gz

Download URL irides_enrichment-0.2.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
81af91db23b005be36ebd3b338bb0445f4c19ddc3a3d6e803c0bb82c2b3f2fef
BLAKE2b-256 checksum
How to use checksums
06cd6b1a681ebe9530fe96dedc0919d2a2f6d7162b50b5e523590e4da2e53ee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / irides_enrichment-0.2.0-py3-none-any.whl

Download URL irides_enrichment-0.2.0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f615dbd78dce64fc1fd51e434ac72f658c7fe57f567d573b9e0afc30509a94c
BLAKE2b-256 checksum
How to use checksums
011b279fd5a6e21fd437667493cc45cee28e354dec188795ad4ccded03f1f0ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Security for irides-enrichment 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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