Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

reg_meta

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 reg-meta
reg-meta update      # downloads package + database (~400 MB compressed)

Maintainers can build from pinned prepared sources and checked curation with reg_meta_build. See its catalog workflow for preparation, diagnostic builds and strict publication. A build does not read loose CSV exports or modify accepted inputs.

Quick start

reg-meta search --query "kommun"                     # search all fields
reg-meta search --query "kommun" --field datacolumn  # column headers only
reg-meta get register LISA                           # register overview
reg-meta get schema --register LISA --years 2020     # columns for a year
reg-meta get groups LISA                             # folded variable families
reg-meta get varinfo "Kön"                           # variable details
reg-meta resolve --columns "Kon,FodelseAr"           # map column names
reg-meta 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 register edition (validity window), with --years, --columns-like, --summary, --flat
get groups Concept groups (folded variable families) with member facets; --classifications for vintage families
get varinfo Variable details with per-era variable_state history
get values Value-set members for a variable, year-projected per variable_state era
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
get classification Normalized code systems (SUN, SSYK, SNI, LKF, ...) with --list, --codes, --variables
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
update Update package and database to the latest version
info Database stats and import metadata

Build commands (build-db, build-docs, seed-slugs, precheck-slugs, parse-sos) live in the separate reg_meta_build package. They are maintainer-only and require a repo checkout (the wheel does not ship curation/, fqid_slugs/, input_data/, or docs/); see the reg_meta_build README for the build flow.

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/reg_meta/ by default. --catalog NAME selects its NAME/ subdirectory; --catalog global keeps the data root. --db DIRECTORY and $REG_META_DB select an explicit artifact directory. --catalog and --db are mutually exclusive. Explicit flags take precedence over the environment. Named steward selections must match the artifact's steward identity.

A steward artifact defaults to holdings scope; a public catalog defaults to reference. search, get register, get schema and get availability accept --scope holdings or --scope reference. Reference scope reads the full selected artifact. Holdings scope narrows bindings, states and periods to compiled possession; requesting it on a public catalog is a configuration error.

reg-meta --catalog swecov --scope holdings get register scb/lisa
reg-meta --catalog swecov --scope reference search --query "inkomst"
reg-meta update --catalog swecov
reg-meta --catalog swecov order project_data.json -o order.json

Order reads compiled holdings from the selected artifact. Its provenance records the artifact kind, steward and deterministic generation ID. A public catalog uses global logical fallback. Documentation uses only the selected directory's sibling reg_meta_docs.db; missing docs do not block metadata or order reads. Updating an explicit directory requires an existing publishable artifact and preserves its identity. Bootstrap an empty installation with a named or default update.

Files

Path Purpose
DESIGN.md Design rationale, constraints, and the object model
../reg_meta_build/DESIGN.md Build pipeline and per-provider source-delivery shapes
../reg_meta_build/docs/SCHEMA.md Documentation markdown file format
src/reg_meta/ Package source
tests/ Test suite

Metadata

Release files for reg-meta 0.44.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 reg-meta 0.44.0
File Size Uploaded Provenance Actions
reg_meta-0.44.0.tar.gz 423.8 kB With provenance Details for reg_meta-0.44.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reg-meta 0.44.0
File Interpreter ABI Platform Actions
reg_meta-0.44.0-py3-none-any.whl Python 3 none any Details for reg_meta-0.44.0-py3-none-any.whl

Total release size: 682.1 kB

Release files / reg_meta-0.44.0.tar.gz

Download URL reg_meta-0.44.0.tar.gz
Size 423.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e389a71519fa69ba6365aa326f2f30af554a2d09f4de5fccb9556fb0a88f13b1
BLAKE2b-256 checksum
How to use checksums
d8b5fe4a7a42dca6c17f88d7e7d16163d24546431f5ad75265ca07455c2e489c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / reg_meta-0.44.0-py3-none-any.whl

Download URL reg_meta-0.44.0-py3-none-any.whl
Size 258.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96926ef39550a86003ba549ff5db76dcd50dfb609294a86f5800dc18cdd26e9f
BLAKE2b-256 checksum
How to use checksums
0da6dccba02843198c5372edf9fe6cb64bd01cd5ca8055be0d695f4c3a6e757f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for reg-meta 0.44.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reg_meta-0.44.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

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
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