Skip to content

sbr.container

Modules:

Classes:

Rule

Bases: BaseModel

Methods:

Attributes:

domain class-attribute instance-attribute

domain: Set = set()

domain_keyword class-attribute instance-attribute

domain_keyword: Set = set()

domain_regex class-attribute instance-attribute

domain_regex: Set = set()

domain_suffix class-attribute instance-attribute

domain_suffix: Set = set()

ip_cidr class-attribute instance-attribute

ip_cidr: Set = set()

model_config class-attribute instance-attribute

model_config = ConfigDict(extra='forbid')

__getitem__

__getitem__(key: str) -> set[str]

__len__

__len__() -> int

__or__

__or__(other: Rule) -> Rule

__sub__

__sub__(other: Rule) -> Rule

difference

difference(*others: Rule) -> Rule

from_file classmethod

from_file(path: StrPath) -> Rule

geoip

geoip() -> Rule

geosite

geosite() -> Rule

op

op(op: Callable[[Any, Any], Any], other: Rule) -> Rule

optimize

optimize() -> None

save

save(path: StrPath) -> None

summary

summary() -> str

union

union(*others: Rule) -> Rule

RuleSet

Bases: BaseModel

Methods:

Attributes:

rules instance-attribute

rules: list[Rule]

version instance-attribute

version: Literal[1, 2]

from_file classmethod

from_file(path: StrPath) -> RuleSet

save

save(path: StrPath) -> None