py_abac.policy.conditions.others package

Submodules

py_abac.policy.conditions.others.any module

Attribute any value conditions

class py_abac.policy.conditions.others.any.Any[source]

Bases: py_abac.policy.conditions.base.ConditionBase

Condition for attribute having any value

is_satisfied(ctx) → bool[source]

Is conditions satisfied?

Parameters

ctx – evaluation context

Returns

True if satisfied else False

class py_abac.policy.conditions.others.any.AnySchema(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]

Bases: marshmallow.schema.Schema

JSON schema for any value condition

post_load(data, **_)[source]
opts = <marshmallow.schema.SchemaOpts object>

py_abac.policy.conditions.others.cidr module

Conditions relevant to networking context

class py_abac.policy.conditions.others.cidr.CIDR(value)[source]

Bases: py_abac.policy.conditions.base.ConditionBase

Condition for IP address what in CIDR value.

is_satisfied(ctx) → bool[source]

Is conditions satisfied?

Parameters

ctx – evaluation context

Returns

True if satisfied else False

class py_abac.policy.conditions.others.cidr.CIDRSchema(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]

Bases: marshmallow.schema.Schema

JSON schema for CIDR condition

post_load(data, **_)[source]
opts = <marshmallow.schema.SchemaOpts object>

py_abac.policy.conditions.others.exists module

Attribute exists conditions

class py_abac.policy.conditions.others.exists.Exists[source]

Bases: py_abac.policy.conditions.base.ConditionBase

Condition for attribute value exists

is_satisfied(ctx) → bool[source]

Is conditions satisfied?

Parameters

ctx – evaluation context

Returns

True if satisfied else False

class py_abac.policy.conditions.others.exists.ExistsSchema(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]

Bases: marshmallow.schema.Schema

JSON schema for attribute value exists conditions

post_load(data, **_)[source]
opts = <marshmallow.schema.SchemaOpts object>

py_abac.policy.conditions.others.not_exists module

Attribute does not exists conditions

class py_abac.policy.conditions.others.not_exists.NotExists[source]

Bases: py_abac.policy.conditions.base.ConditionBase

Condition for attribute value not exists

is_satisfied(ctx) → bool[source]

Is conditions satisfied?

Parameters

ctx – evaluation context

Returns

True if satisfied else False

class py_abac.policy.conditions.others.not_exists.NotExistsSchema(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]

Bases: marshmallow.schema.Schema

JSON schema for attribute value not exists condition

post_load(data, **_)[source]
opts = <marshmallow.schema.SchemaOpts object>

Module contents

Other conditions