Skip to main content
Metaseed

Metaseed

CI codecov

Schema-driven metadata management from YAML specifications.

Documentation | Introduction Slides

What is Metaseed?

A schema-driven metadata management system that:

  • Defines entity schemas in human-readable YAML
  • Generates Pydantic models dynamically at runtime
  • Validates with composable rules
  • Supports multiple metadata standards (MIAPPE, ISA, Darwin Core, ...)
  • Exports a dataset as a DCAT catalog card (JSON-LD / Turtle) for data portals and FAIR assessment
YAML specs → Pydantic models → Validation → Serialization

Installation

Requires Python 3.11+

# Install from GitHub
uv tool install git+https://github.com/sorenwacker/metaseed.git

# Or for development
git clone https://github.com/sorenwacker/metaseed.git
cd metaseed
uv sync --extra dev

Supported Profiles

Profile Version Entities Fields Domain
MIAPPE 1.2 14 163 Plant phenotyping
ISA 1.0 22 139 Life science
Darwin Core 1.0 10 189 Biodiversity
DiSSCo 0.4 16 261 Digital specimens
ENA 1.0 11 109 Nucleotide archive
JERM 1.0 24 229 Systems biology

User-defined profiles supported in ~/.local/share/metaseed/specs/

Modi Operandi

Metaseed operates in four modes:

Mode Interface Use Case
CLI metaseed Script automation
Web UI Browser Visual editing
REST API HTTP System integration
Python API Library Programmatic access
MCP Server AI Claude integration

CLI Mode

# List entities in a profile
metaseed entities miappe 1.2

# Generate entity template
metaseed template miappe 1.2 Investigation

# Validate a dataset
metaseed validate dataset.yaml --profile miappe --version 1.2

# Start web UI
metaseed ui

# Start MCP server (for Claude Desktop)
metaseed mcp --transport stdio

Python API

from metaseed import MetaseedClient

client = MetaseedClient("miappe", "1.2")

# Create root entity
inv = client.create_entity("Investigation", {
    "unique_id": "INV001",
    "title": "Drought Tolerance Study",
    "description": "Multi-year field trial..."
})

# Create child with parent linkage
study = client.create_entity("Study", {
    "unique_id": "STU001",
    "title": "Field Trial 2024",
    "start_date": "2024-03-01"
}, parent_id=inv.id)

# Validate entire dataset
result = client.validate()
print(f"Valid: {result.is_valid}, Errors: {len(result.errors)}")

Architecture

graph LR
    subgraph interfaces["Interfaces"]
        direction RL
        CLI["CLI"]
        UI["Web UI"]
        API["REST API"]
        MCP["MCP Server"]
    end

    subgraph core["Core"]
        Client["MetaseedClient"]
        Facade["ProfileFacade"]
        Factory["Model Factory"]
        Validators["Validation Engine"]
    end

    subgraph data["Data Layer"]
        Specs["YAML Specs"]
        Repo["Entity Storage"]
        Storage["JSON/YAML Files"]
    end

    interfaces --> Client
    Client --> Facade
    Facade --> Factory
    Facade --> Validators
    Factory --> Specs
    Validators --> Repo
    Repo --> Storage

Validation

Composable validation rules defined in YAML:

  • Required field checking
  • Pattern matching (regex)
  • Range validation (min/max)
  • Date range validation
  • Coordinate pair validation
  • Uniqueness constraints (within parent or global)
  • Referential integrity (foreign keys)
  • Conditional rules
validation:
  - type: uniqueness
    entity: Study
    field: unique_id
    scope: parent

  - type: referential_integrity
    entity: ObservationUnit
    field: study_id
    references:
      entity: Study
      field: unique_id

MCP Integration

Model Context Protocol enables AI-assisted metadata extraction with Claude.

Tool categories:

  • Profile Discovery — list_profiles, get_profile_schema
  • File Extraction — parse_source_file, extract_entities
  • Entity CRUD — create_entity, update_entity, delete_entity
  • Validation — validate_entity, validate_dataset
  • Ontology — search_ontology, suggest_ontology_term

Technology Stack

Layer Technologies
Core Python 3.11+, Pydantic 2.0+
Interfaces FastAPI, Typer, HTMX, Jinja2
Data PyYAML, openpyxl
Agent mcp, FastMCP
Dev uv, pytest, ruff, pre-commit

Development

make setup    # Install dependencies + pre-commit hooks
make dev      # Start development server
make test     # Run tests
make lint     # Run linter
make docs     # Serve documentation locally

Data sources and attribution

Ontology term lookup and validation use the EMBL-EBI Ontology Lookup Service (OLS4). Term data is retrieved from the public OLS4 API and remains the property of the respective source ontologies. Use of OLS is subject to the EMBL-EBI Terms of Use.

Metaseed is a considerate API client: it caches results, rate-limits requests, and identifies itself with a descriptive User-Agent. For bulk or high-volume term resolution, prefer downloading the source ontologies or running a local OLS instance rather than the public API.

License

MIT

Download files

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

Source Distribution

metaseed-0.27.0.tar.gz (622.8 kB view details)

Uploaded Source

Built Distribution

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

metaseed-0.27.0-py3-none-any.whl (761.9 kB view details)

Uploaded Python 3

File details

Details for the file metaseed-0.27.0.tar.gz.

File metadata

  • Download URL: metaseed-0.27.0.tar.gz
  • Upload date:
  • Size: 622.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metaseed-0.27.0.tar.gz
Algorithm Hash digest
SHA256 8328d5b7c72f97960c0f4d3e01b24e0a44ed13e60bfe7d0264679cf2de21d27a
MD5 aa51cc9e810bffbbcf3ceb5b618fe8fc
BLAKE2b-256 9fe71e344d6f41d32eacb4979f0a1b0aa6bad7a9cc11ce11bc4b2fbbea03a0b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaseed-0.27.0.tar.gz:

Publisher: release.yml on sorenwacker/metaseed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metaseed-0.27.0-py3-none-any.whl.

File metadata

  • Download URL: metaseed-0.27.0-py3-none-any.whl
  • Upload date:
  • Size: 761.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metaseed-0.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f1458184ad1c3a03a18f11589f427c7b021f246487f6a63e9932e57a7d0fd9
MD5 8f3637119d80469d0a00efd1946e57e3
BLAKE2b-256 ffa5666fcc14aa9caeeb35f5edfb8f14f19a2cd991606b4fa84fa847458cc026

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaseed-0.27.0-py3-none-any.whl:

Publisher: release.yml on sorenwacker/metaseed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.48.0

2 files

0.47.0

2 files

0.46.0

2 files

0.45.0

2 files

0.44.0

2 files

0.43.0

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.0

2 files

0.34.0

2 files

0.33.0

2 files

0.32.1

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

This release

0.27.0 This release

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.1

2 files

0.22.0

2 files

0.21.1

2 files

0.21.0

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

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