Skip to content

angee.platform.composed

Composed-addon introspection — the single walk over the app registry.

One owner for the per-addon rollups (model/field/resource counts, dependency edges) the platform surface needs. Both the live explorer view (schema._build_explorer) and the Addon reflection sync (AddonManager.reconcile_from_registry) read these — never two parallel walks.

AddonRollup

python
@dataclass(frozen=True, slots=True)
class AddonRollup()

One composed addon's rolled-up facts, derived from the app registry.

addons

python
def addons() -> list[AppConfig]

Return the composed Angee addon app configs, sorted by name.

is_historical

python
def is_historical(model: type[Model]) -> bool

Return whether model is a simple-history audit shadow (carries instance_type).

data_models

python
def data_models(config: AppConfig) -> list[type[Model]]

Return one addon's concrete data models (no anchors, proxies, or history shadows).

own_fields

python
def own_fields(model: type[Model]) -> list

Return a model's own concrete columns plus declared many-to-many fields.

resource_counts

python
def resource_counts() -> dict[str, int]

Return resource-ledger row counts keyed by source addon.

The resources addon owns the ledger and its rollup; ask it rather than re-querying its model here.

addon_rollups

python
def addon_rollups() -> list[AddonRollup]

Roll up every composed addon's model/field/resource facts from the app graph.

The single derivation the explorer view and the reflection table both read.

Released under the AGPL-3.0 License.