Let's describe alowed rules!
Project description
Describe rules for domain
Usage example:
import json
from domainrules import Domain, Rule
from domainrules.fabric import NewRule
#1. Set rules decorators
domain = Domain("")
# default bal - 0
base_rule = Rule(domain).set_rules(bal=0)
system_domain_rules: list[dict]
for rule in system_domain_rules:
rule_dict = json.loads(rule)
base_rule = NewRule.build(base_rule, rule_dict)
#2. apply
system_domain_rules.name = "somedomain.com"
if system_domain_rules.weight > 50:
print("Warning!")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
domainrules-0.1.15.1.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for domainrules-0.1.15.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb21294393303aee7a8c173c5fed1c2f58dbe221a9fdbc10cafc5c9e07cb128e |
|
MD5 | 02c5007bdd549cdd8c61454076c93d4f |
|
BLAKE2b-256 | 9a2e30f3e77243fbe8b542b9fea5c78548052419f33bea2216a801db79e31806 |