Skip to main content

v1

root_link_targets record, v1 — canonical aliases.

Consumers and the record registry import from here and never touch the inner module names, mirroring types/directory_metadata/v1/__init__.py.

Module​

Submodules​

Classes​

ORM​

class ORM(**kwargs):

SQLAlchemy model for the root_link_targets cache table.

One row per place a datasource's tree leaves itself through a link (a symlink, a Windows junction): the resolved directory the walk reached there, which is not under the root. file_metadata rows are keyed on resolved paths, so a file reached through a link is stored under the target's spelling, and selecting by the root alone would miss it.

Keyed on the pair, so two datasources whose trees reach the same target each keep their own row.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Variables​

  • recorded_at : sqlalchemy.orm.base.Mapped[str | None]
  • root_path : sqlalchemy.orm.base.Mapped[str]
  • run_id : sqlalchemy.orm.base.Mapped[str | None]
  • tags : sqlalchemy.orm.base.Mapped[dict[str, typing.Any] | None]
  • target_path : sqlalchemy.orm.base.Mapped[str]

Record​

class Record(**data: Any):

One place a datasource's tree leaves itself through a link.

target_path is the resolved directory the walk reached there, so it is the spelling the files beneath it are stored under in file_metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Variables​

  • static model_config
  • static recorded_at : str | None
  • static root_path : str
  • static run_id : str | None
  • static target_path : str