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.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for domainrules-0.1.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 161d65bb8fad4274904ab81fa984745ae1f3738bb040bb357cbd55a2c65ac577 |
|
MD5 | cf993fe9318468a3c3f2a201c0aae9e5 |
|
BLAKE2b-256 | 56cf2568603d0ea39b9766e859945307aa7de9cdfe2fe9330e48d8c2b47a4249 |