Skip to main content

Metacrafter

Python command-line tool and library to label table fields and data files. Use it to find meaningful columns in tables — or to find personal identifiable information (PII).

Documentation

The full documentation site (Docusaurus) lives in docs/ and is published at apicrafter.github.io/metacrafter.

Section What it covers
Getting started Install, quick start, positioning
Cookbook Task index by role
CLI reference Every command
Formats Files and compression codecs
Python SDK CrafterCmd API
LLM classification Hybrid rules + RAG
Troubleshooting Common errors

Source pages: docs/docs/. Changelog: CHANGELOG.md.

Repository assessment and proposed work: Code quality review and improvement plan (2026-10-01).

Installation

Requires Python 3.10+.

pip install metacrafter

The default rule pack is downloaded on first use from the pinned metacrafter-rules GitHub release (verified by SHA-256 and cached). Registry data comes from registry.apicrafter.io. For offline use, run metacrafter rules fetch and metacrafter registry fetch --to DIR.

Optional extras:

pip install 'metacrafter[formats]'       # Parquet, ORC, Excel, XML, compressed files
pip install 'metacrafter[mongodb]'       # MongoDB and BSON
pip install 'metacrafter[duckdb]'        # native DuckDB scanning
pip install 'metacrafter[server]'        # HTTP API server
pip install 'metacrafter[llm]'           # LLM/RAG hybrid classification
pip install 'metacrafter[datahub]'       # DataHub export
pip install 'metacrafter[openmetadata]'  # OpenMetadata export
pip install 'metacrafter[all]'           # everything above
pip install 'metacrafter[dev]'           # tests and linters

Set auto_rules: false in .metacrafter to load only the rule paths you list.

from metacrafter import CrafterCmd

Features

  • YAML rules for field names and values (text, PyParsing, Python functions)
  • PII, person names, identifiers (UUID/GUID, email, phone), dates (312+ patterns via qddate), and country-specific types
  • Files via iterabledata: CSV, TSV, JSON/JSONL, XML, Parquet, Avro, ORC, Excel, BSON, Pickle, plus gzip/bzip2/xz/lz4/zstd/brotli/snappy/zip
  • SQL databases (SQLAlchemy) and MongoDB
  • Context and language filters so only relevant rules run
  • Built-in HTTP API (metacrafter server run)
  • Optional LLM/RAG classification (OpenAI, OpenRouter, Ollama, LM Studio, Perplexity)
  • Export to DataHub, OpenMetadata, and Apache Atlas
  • Datatype URLs from metacrafter-registry

Quick start

metacrafter scan file somefile.csv --format short

metacrafter scan file users.csv \
  --contexts pii \
  --langs en \
  --confidence 20.0 \
  --format full \
  -o pii_scan.json

metacrafter scan sql "sqlite:///users.db" --format full -o db.json

metacrafter rules list
metacrafter server run --host 127.0.0.1 --port 10399

More examples: Quick start and Cookbook.

Ecosystem

Commercial support

Contact ibegtin@apicrafter.io or ivan@begtin.tech for a commercial API with additional rules and dedicated support.

License

Apache-2.0. See LICENSE.

Metadata

Release files for metacrafter 1.0.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 metacrafter 1.0.0
File Size Uploaded Provenance Actions
metacrafter-1.0.0.tar.gz 194.6 kB Without provenance Details for metacrafter-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 368.9 kB

Release files / metacrafter-1.0.0.tar.gz

Download URL metacrafter-1.0.0.tar.gz
Size 194.6 kB
Tags Source
SHA-256 checksum
How to use checksums
df02b54156dd570cd5a6f0dc53d0971cd70871c7c78e69a5bbd694a36645a43b
BLAKE2b-256 checksum
How to use checksums
8972330a5547a84c545f10690f56f4254147b59731573c3fb86d459a55ec912c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.18

Release files / metacrafter-1.0.0-py3-none-any.whl

Download URL metacrafter-1.0.0-py3-none-any.whl
Size 174.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a4cbda0d8e031fc91f62f01c11a60306e1b94543d5965341ad2f6588688891c
BLAKE2b-256 checksum
How to use checksums
e352d51a6f44e7ec995006d9ca6812d28b37c186daf8f8d9e47a8fc255d4a268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.18

Security for metacrafter 1.0.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.

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