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.12.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for domainrules-0.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a973190eb6a8f9d363386398b9788786517bda453a89ffd8214f0d9e2531ed32 |
|
MD5 | 43034fbe43c2f0594265a69ce88ec1ee |
|
BLAKE2b-256 | 3664a563af4870a685f98135d05aa7664be2713590236b99df51691929c669c7 |