undr.json_index#

Basic index files parsing.

Overview#

Functions#

load

Reads and validates a -index.json file.

Attributes#

schema

JSON schema for -index files.

Module Contents#

exception undr.json_index.InstallError(path: pathlib.Path)#

Bases: FileNotFoundError

Raised if the target path does not exist.

Parameters:

path (pathlib.Path) – The path that does not exist.

__str__() str#

Return str(self).

undr.json_index.load(path: pathlib.Path) dict[str, Any]#

Reads and validates a -index.json file.

This function caches the parsed contents of up to undr.constants.LRU_CACHE_MAXSIZE files.

Parameters:

path (pathlib.Path) – The path of the file to read.

Raises:
  • InstallError – if the file does not exist.

  • jsonschema_rs.ValidationError – if validation fails.

Returns:

Parsed JSON file contents.

Return type:

dict[str, Any]

undr.json_index.schema#

JSON schema for -index files.