ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Ensure a string does not end with any of the given suffixes.

Method __init__ Initialize the rule with the forbidden suffixes.
Async Method enforce Validate a field value against the forbidden suffixes.
Class Variable __code__ doesnt_end_with.
Class Variable __message__ Value must not end with any of the forbidden suffixes..
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _suffixes Suffixes the value must not end with. At least one is required.

Inherited from Rule:

Method __init_subclass__ Require asynchronous enforcement on every rule subclass.
Async Method validate Validate the field by awaiting its asynchronous enforcement.
Instance Variable _code Machine-readable status or error code.
Instance Variable _message Override message used when validation fails.
def __init__(self, *suffixes: str, message: str | None = None): (source)

Initialize the rule with the forbidden suffixes.

Parameters
*suffixes:strSuffixes the value must not end with. At least one is required.
message:str | None, optionalOverride message used when validation fails.
Returns
NoneNo return value.
Raises
ValueErrorIf no suffix is supplied.
async def enforce(self, field: str, value: object, instance: object) -> bool: (source)

Validate a field value against the forbidden suffixes.

Parameters
field:strField name associated with the value.
value:objectValue to validate.
instance:objectOwning object instance. This argument is accepted for interface compatibility.
Returns
boolReturn True when the value passes validation.
__code__: str = (source)

doesnt_end_with.

__message__: str = (source)

Value must not end with any of the forbidden suffixes..

__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_suffixes: tuple[str, ...] = (source)

Suffixes the value must not end with. At least one is required.