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.14.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for domainrules-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02052f8716a91221d2533ebb727a758f849748caf8c0b70958fe5d602ed9765a |
|
MD5 | 757f986e6cfc071257cf884140db27d1 |
|
BLAKE2b-256 | 1402a3ac6cbfba65d156a2409d291d763da6c43720b0e29be200451196cd6a89 |