EvaluationContext

class policyengine.engine.EvaluationContext(proposal)

Class to hold all variables available in a policy evaluation. All attributes on this class are in scope and can be used by the policy author.

proposal

The proposal representing this evaluation.

Type

Proposal

action

The action that triggered this policy evaluation.

Type

BaseAction

policy

The policy being evaluated.

Type

Policy

slack
Type

SlackCommunity

discord
Type

DiscordCommunity

discourse
Type

DiscourseCommunity

reddit
Type

RedditCommunity

github
Type

GithubCommunity

opencollective
Type

OpencollectiveCommunity

loomio
Type

LoomioCommunity

sourcecred
Type

SourcecredCommunity

metagov

Metagov library for performing enabled actions and processes.

Type

Metagov

logger

Logger that will log messages to the PolicyKit web interface.

Type

logging.Logger

variables

Dict with policy variables keys and values

Type

Policy.variables