API reference#
The dscat Python package. The command-line interface is described in the
CLI guide; this page documents the importable API that backs
it. Each entry links to a page generated from the source docstrings.
Data model#
The dataclasses that flow from the adapters into the index, and the configuration that drives them.
One dictionary variable, normalised for the index. |
|
One physical CSV file in a dataset version. |
|
One dataset's adapter configuration, loaded from a JSON file. |
|
One discovered version of a dataset: a vendor ship folder. |
Catalogue index#
The SQLite catalogue and its typed read and write helpers. The tables it builds are described in Catalogue schema.
A connection to the SQLite catalogue index. |
Ingestion#
Discovering versions, parsing dictionaries, and building the index.
Build or refresh the catalogue index from |
|
What one dataset contributed to the index during ingestion. |
|
Parse a version's dictionary into feature rows using the configured layout. |
|
Return versions for one dataset, newest first. |
|
Built-in adapters, with optional project overrides from |
|
Order versions: ISO dates > dotted-numeric > raw string. |
Queries#
Read queries over the catalogue, scoped to the latest version of each dataset by default.
List tables in scope, one aggregated row per logical table. |
|
Return a table's rows, a page of its features, and the total feature count. |
|
Full-text search features by name, title, definition, value coding, and notes. |
|
Build an FTS5 MATCH expression from a free-text query. |
|
Look up features by name, |
|
Return up to four |
|
List non-dictionary documentation files in scope. |
|
Find documentation files whose title or path contains every token in |
|
Map each dataset to its newest version id. |
Diffing#
Comparing a dataset’s dictionary across versions.
Compare a dataset's dictionary between two versions. |
|
The differences between two versions of a dataset's dictionary. |
Documentation files#
Discovering and converting a version’s non-dictionary documents.
Return (relative_path, kind, title) for documentation files under a version. |
|
A document-to-markdown conversion engine. |
|
Return the engine used for |
|
Convert |
|
Return windows of lines around each case-insensitive match of |
|
Return the cache path for a document converted by |
Dictionary input#
Reading Excel data dictionaries.
Return the worksheet names in an Excel workbook, in document order. |
|
Read a worksheet as rows of cleaned string cells. |
Output rendering#
Rendering command results as a table, CSV, TSV, JSON, or Markdown.
A serialisation format for tabular command output. |
|
Render records in the requested format. |
Paths and synonyms#
Locating the repository and its catalogue, and loading query synonyms.
Walk up from |
|
Return the raw-datasets directory, |
|
Return the generated-catalogue directory, |
|
Return the path to the SQLite index, |
|
Return the converted-documents cache directory, |
|
Load synonym pairs from the built-in groups and any project file. |