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
Known subclasses: orionis.schemas.rule.Rule
Constructor: IRule(message)
Define the contract for rule implementations.
| Method | __init__ |
Initialize the rule with an optional custom failure message. |
| Async Method | enforce |
Evaluate asynchronously whether the current value satisfies this rule. |
| Async Method | validate |
Await validation and return a failure or None. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
overridden in
orionis.schemas.rule.RuleInitialize the rule with an optional custom failure message.
| Parameters | |
message:str | None, optional | Custom message used for validation failures. If None, default messages are used. |
| Returns | |
None | No return value. |
overridden in
orionis.schemas.rule.Rule
async def validate(self, field:
str, value: object, instance: object) -> ValidationFailure | None:
(source)
¶
overridden in
orionis.schemas.rule.RuleAwait validation and return a failure or None.
| Parameters | |
field:str | Name of the field being validated. |
value:object | Current field value to validate. |
instance:object | Object instance that owns the field. |
| Returns | |
orionis.schemas.entities.failure.ValidationFailure | None | A failure describing the constraint violation, or None when the value is valid. |
overridden in
orionis.schemas.rule.RuleDeclare that this class introduces no additional instance slots.