Search and query SCB registry metadata
Project description
regmeta
Search and query SCB registry metadata from a local SQLite database. Designed for programmatic use by LLM agents and tools; terminal use is secondary.
Install
uv tool install regmeta
regmeta maintain update # downloads package + database (~400 MB compressed)
Alternatively, build from raw SCB CSV exports (requires access to mikrometadata.scb.se):
regmeta maintain build-db --csv-dir path/to/SCB-data/
Quick start
regmeta search --query "kommun" # search all fields
regmeta search --query "kommun" --field datacolumn # column headers only
regmeta get register LISA # register overview
regmeta get schema --register LISA --years 2020 # columns for a year
regmeta get varinfo "Kön" # variable details
regmeta resolve --columns "Kon,FodelseAr" # map column names
regmeta docs search "disponibel inkomst" # search documentation
Use --help on any command or subcommand for full flag documentation.
Commands
Query
| Command | Purpose |
|---|---|
search |
Free-text search across registers, variables, columns, and value codes |
get register |
Register overview with variants |
get schema |
Column listing per version, with --years, --columns-like, --summary, --flat |
get varinfo |
Variable details with instance history |
get values |
Value-set members for a CVID, with optional --valid-at date filter |
get datacolumns |
All column aliases for a variable across registers |
get coded-variables |
Variables with value sets, ranked by usage |
get diff |
Schema changes between two years for a register |
get lineage |
Variable provenance across registers |
get availability |
Temporal coverage for a variable or register |
resolve |
Exact alias lookup for column names (batch) |
Documentation
| Command | Purpose |
|---|---|
docs search |
Full-text search over curated register documentation |
docs get |
Retrieve full documentation for a variable or topic |
docs list |
Browse available documentation by type, topic, or register |
Maintenance
| Command | Purpose |
|---|---|
maintain update |
Update package and database to the latest version |
maintain build-db |
Build database from SCB CSV exports |
maintain build-docs |
Build documentation search index from markdown files |
maintain info |
Database stats and import metadata |
Output formats
All commands support --format {table,list,json}. Default is table,
which auto-switches to list for narrow results. Add -v for the full
JSON envelope (contract version, timing, database info).
Register arguments accept numeric IDs, exact names, or substring matches.
Database
Stored at ~/.local/share/regmeta/ by default.
Override with --db or $REGMETA_DB.
Files
| Path | Purpose |
|---|---|
| DESIGN.md | Design rationale and constraints |
| STRUCTURE.md | Domain model (SCB metadata hierarchy) |
| docs/SCHEMA.md | Documentation file format |
src/regmeta/ |
Package source |
tests/ |
Test suite |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regmeta-0.6.4.tar.gz.
File metadata
- Download URL: regmeta-0.6.4.tar.gz
- Upload date:
- Size: 387.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9619f67ceb06fa5a69d38d615ff118a9f1a6c3d7922f7f6b899e7f90547010e
|
|
| MD5 |
9cf4767f8bc4a2714ecb4fddbe1a3d46
|
|
| BLAKE2b-256 |
87c218377afed83113a47a75b2089ce50d3d48bc5ce1e51c68af7d54ac357dde
|
Provenance
The following attestation bundles were made for regmeta-0.6.4.tar.gz:
Publisher:
publish_regmeta.yml on adamaltmejd/registry-research-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regmeta-0.6.4.tar.gz -
Subject digest:
c9619f67ceb06fa5a69d38d615ff118a9f1a6c3d7922f7f6b899e7f90547010e - Sigstore transparency entry: 1350626838
- Sigstore integration time:
-
Permalink:
adamaltmejd/registry-research-toolkit@2cbb422d47f71d8cb4a4cc87cb0acc9e5f5ef96c -
Branch / Tag:
refs/tags/regmeta/v0.6.4 - Owner: https://github.com/adamaltmejd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_regmeta.yml@2cbb422d47f71d8cb4a4cc87cb0acc9e5f5ef96c -
Trigger Event:
release
-
Statement type:
File details
Details for the file regmeta-0.6.4-py3-none-any.whl.
File metadata
- Download URL: regmeta-0.6.4-py3-none-any.whl
- Upload date:
- Size: 60.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2f026d959f078998a9633300d6a5d25304e7bcdb604a79dd6ef634d97291857
|
|
| MD5 |
d611c01cd3d78790ac47544911df7501
|
|
| BLAKE2b-256 |
04baf892f9d7f5bd14794891a62839971431554792f80213e374fed29f4c7d8a
|
Provenance
The following attestation bundles were made for regmeta-0.6.4-py3-none-any.whl:
Publisher:
publish_regmeta.yml on adamaltmejd/registry-research-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regmeta-0.6.4-py3-none-any.whl -
Subject digest:
a2f026d959f078998a9633300d6a5d25304e7bcdb604a79dd6ef634d97291857 - Sigstore transparency entry: 1350626886
- Sigstore integration time:
-
Permalink:
adamaltmejd/registry-research-toolkit@2cbb422d47f71d8cb4a4cc87cb0acc9e5f5ef96c -
Branch / Tag:
refs/tags/regmeta/v0.6.4 - Owner: https://github.com/adamaltmejd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_regmeta.yml@2cbb422d47f71d8cb4a4cc87cb0acc9e5f5ef96c -
Trigger Event:
release
-
Statement type: