singer_sdk.schema.source.SchemaDirectory

class singer_sdk.schema.source.SchemaDirectory[source]

Schema source for local file-based schemas.

__init__(dir_path, *args, extension='json', **kwargs)[source]

Initialize the file schema source.

Parameters:
  • dir_path (str | Path | Traversable | ModuleType) – Path to a directory containing JSON schema files.

  • *args (t.Any) – Additional arguments to pass to the superclass constructor.

  • **kwargs (t.Any) – Additional keyword arguments to pass to the superclass constructor.

  • extension (str) – The extension of the schema files.

Return type:

None

fetch_schema(key)[source]

Retrieve schema from the file.

Parameters:

key (str) – Ignored for file schemas.

Returns:

A JSON schema dictionary.

Return type:

dict[str, Any]