harp_apps.rules.models.rulesets

Inheritance diagram of harp_apps.rules.models.rulesets

class BaseRuleSet[source]

Bases: object

CompilerType

alias of BaseRuleSetCompiler

__init__(rules=None, /, *, levels=('default',))[source]
add(sources)[source]
Parameters:

sources (dict)

match(*args, trailing_slash=False)[source]

Match the given arguments against the rules. Each argument must match a “level” in this ruleset.

With trailing_slash, the second level (the request fingerprint) lets exact patterns match a path without its final slash, see Pattern.match().

Parameters:

trailing_slash (bool)

property rules
class RuleSet[source]

Bases: BaseRuleSet

__init__()[source]