Skip to content

API Reference parrot.semantic.accounting.loader

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.semantic.accounting.loader

View source

Accounting model loader (FEAT-713 M4): selectors, resolved natures, validation, hashing.

Alias AccountSet

Re-exported from parrot.semantic.accounting.models.AccountSet.

Alias AccountingModel

Re-exported from parrot.semantic.accounting.models.AccountingModel.

Alias AccountingModelSpec

Re-exported from parrot.semantic.accounting.models.AccountingModelSpec.

Alias ChartSnapshot

Re-exported from parrot.semantic.accounting.models.ChartSnapshot.

Alias ModelValidationError

Re-exported from parrot.semantic.accounting.errors.ModelValidationError.

Alias Problem

Re-exported from parrot.semantic.accounting.errors.Problem.

Alias ResolvedSet

Re-exported from parrot.semantic.accounting.models.ResolvedSet.

Function canonical_json

Sorted keys, no whitespace, Decimals as strings — the hashing representation.

canonical_json(obj: BaseModel) -> str

Parameter Type Default Description
obj BaseModel

Returns: str

Function detect_drift

Accounts in fresh that no set of model covers and no exclusion lists, sorted.

detect_drift(model: AccountingModel, fresh: ChartSnapshot) -> tuple[str, ...]

Parameter Type Default Description
model AccountingModel
fresh ChartSnapshot

Returns: tuple[str, ...]

Function load_model

Resolve selectors, partition intervals, validate (ALL problems), hash. Raises ModelValidationError.

load_model(source: Path | dict, snapshot: ChartSnapshot, *, columns: Mapping[str, str] | None = None) -> AccountingModel

Parameter Type Default Description
source Path | dict
snapshot ChartSnapshot
columns Mapping[str, str] | None None

Returns: AccountingModel

Function load_spec

Parse a model YAML (or dict) into an AccountingModelSpec.

load_spec(source: Path | dict) -> AccountingModelSpec

Parameter Type Default Description
source Path | dict A YAML file path or an already-parsed mapping.

Returns: AccountingModelSpec — The validated spec.

Raises:

  • ModelValidationError — On unreadable/non-mapping YAML or any schema error (one problem per error).

Alias partition_intervals

Re-exported from parrot.semantic.accounting.validation.partition_intervals.

Alias validate

Re-exported from parrot.semantic.accounting.validation.validate.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally