Skip to content

Compliance

The compliance engine applies its set of methods in three different ways: Rule applicability, filtering securities, and computing value. The applicability of the rule is determined by a logical expression that uses as arguments the characteristics of a value.

from everysk.sdk.engines.compliance import Compliance


Check

The check method allows the verification of compliance rules against some given rules. The method receives the following parameters:

  • rules: a list of rules to be checked.
  • datastore: the data to be checked against the rules.
  • metadata: The metadata to be used for checking, defaults to None.

The method returns a dictionary with a key containing the boolean value of the compliance check, in other words True if the data is compliant with the rules, False otherwise.

rules = [{'rule1': 'rule1'}, {'rule2': 'rule2'}]
datastore = [{'data': 'data'}, {'data2': 'data2'}]

Compliance.check(rules, datastore)
# {'compliant': True}