Python
ProgramCounts
ProgramCounts class and public members in the unified Python API.Class: ProgramCounts
Python · dataclassSince v0.16.0
ProgramCountsfrozen=TrueImmutable compiled counts for one selected policy, returned by Ruleset.program_counts().
Creation and access
Internal constructor — do not call. Snapshot returned by Ruleset.program_counts; direct construction does not describe a compiled program.
- returned by
Ruleset.program_counts()Read compiled predicate, policy-fact and normalized-rule counts for one policy.
Fields
predicatesintproperty
Declarations in the domain registry, including unused predicates.
factsintproperty
Facts compiled from policy source, excluding runtime EDB facts.
rulesintproperty
Normalized rules, including expanded OR alternatives.
print(ruleset.program_counts())ProgramCounts(predicates=4, facts=0, rules=1)