angee.resources.managers
QuerySet and manager APIs for the resource ledger model.
ResourceQuerySet
class ResourceQuerySet(models.QuerySet[Any])QuerySet methods for validating, loading, and diffing resources.
validate_addons
def validate_addons(addons: Iterable[Any],
*,
tiers: Iterable[object] | None = None) -> ValidationResultValidate selected addon resource files without saving rows.
load_addons
def load_addons(addons: Iterable[Any],
*,
tiers: Iterable[object],
allow_non_dev: bool = False,
dry_run: bool = False) -> LoadResultLoad selected addon resource tiers idempotently.
diff_addons
def diff_addons(
addons: Iterable[Any],
*,
tiers: Iterable[object] | None = None) -> tuple[tuple[str, int], ...]Return resource display names and parsed row counts.
counts_by_addon
def counts_by_addon() -> dict[str, int]Return ledger row counts keyed by source addon (the dotted name).
The ledger is untyped (no rebac_resource_type); the elevated read is bracketed in system_context so it is explicit and audited. Callers own the access gate (e.g. the platform console's platform/explorer read).
ledger_page
def ledger_page(*, limit: int) -> list[Any]Return up to limit ledger rows in the model's declared order.
A hard limit bounds the fetch and the GraphQL payload — the ledger grows one row per imported resource. The read is elevated/audited as in counts_by_addon; callers own the access gate.
ResourceManager
Manager exposing resource ledger operations.