Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

domainrules-0.1.15.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file domainrules-0.1.15.1.tar.gz.

File metadata

  • Download URL: domainrules-0.1.15.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for domainrules-0.1.15.1.tar.gz
Algorithm Hash digest
SHA256 655c9f7705fa37a1724fc0bc5a606338814b995563b04dd681d080562d4fe056
MD5 9657a584e791002d7d5d867a37ca7833
BLAKE2b-256 a600d636682cbf4789c5014b6b45ef53f75eb6e2067a110ec607fc6d0d9539da

See more details on using hashes here.

File details

Details for the file domainrules-0.1.15.1-py3-none-any.whl.

File metadata

File hashes

Hashes for domainrules-0.1.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb21294393303aee7a8c173c5fed1c2f58dbe221a9fdbc10cafc5c9e07cb128e
MD5 02c5007bdd549cdd8c61454076c93d4f
BLAKE2b-256 9a2e30f3e77243fbe8b542b9fea5c78548052419f33bea2216a801db79e31806

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page