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).
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.
pip install metacrafterOptional extras:
pip install 'metacrafter[rules]' # extended YAML rules pack
pip install 'metacrafter[llm]' # LLM/RAG hybrid classification
pip install 'metacrafter[datahub]' # DataHub export
pip install 'metacrafter[openmetadata]' # OpenMetadata export
pip install 'metacrafter[all]' # rules + integrations
pip install 'metacrafter[dev]' # tests and lintersWhen metacrafter[rules] is installed, the extended pack loads automatically.
Set auto_rules: false in .metacrafter to use only paths you list.
from metacrafter import CrafterCmd- 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
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 10399More examples: Quick start and Cookbook.
- metacrafter-rules — extra validators and YAML rules
- metacrafter-registry — canonical semantic types at registry.apicrafter.io
Contact ibegtin@apicrafter.io or ivan@begtin.tech for a commercial API with additional rules and dedicated support.
Apache-2.0. See LICENSE.