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

class Empty(Rule): (source)

Constructor: Empty(message)

View In Hierarchy

Accept None, blank strings, zero, False and zero-length values.

Uploaded files are empty when their byte size is zero. Unsized iterables are not consumed and are considered present.

Async Method enforce Check that a field value is empty.
Class Variable __code__ empty.
Class Variable __message__ Default message reported for a non-empty value.
Class Variable __slots__ Declare that this class introduces no additional instance slots.

Inherited from Rule:

Method __init__ Initialize the rule with an optional custom failure message.
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.
async def enforce(self, field: str, value: object, instance: object) -> bool: (source)

Check that a field value is empty.

Parameters
field:strField path accepted for rule interface compatibility.
value:objectValue to inspect without consuming or changing it.
instance:objectOwner accepted for rule interface compatibility.
Returns
boolWhether the field value is empty.
__code__: str = (source)

empty.

__message__: str = (source)

Default message reported for a non-empty value.

__slots__: tuple = (source)

Declare that this class introduces no additional instance slots.