Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.assets module

The Assets API.

class betty.assets.AssetRepository

  Bases: `object`

  Manages a set of assets.

  This repository unifies several directory paths on disk, overlaying them on each other. Paths added later act as fallbacks, e.g. earlier paths have priority.

  __init__(*assets_directory_paths: Path)
  property assets_directory_paths: Sequence[Path]

    The paths to the individual virtual layers.

  walk(asset_directory_path: Path | None = None) → Iterator[Path]

    Get virtual paths to available assets.

    Parameters:

      asset_directory_path – If given, only asses under the directory are returned.