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 an uploaded file declares one of the accepted MIME types.
Wildcard subtypes such as "image/*" match every subtype of the given top-level type.
| Method | __init__ |
Initialize the rule with the accepted MIME types. |
| Async Method | enforce |
Validate an uploaded file against the accepted MIME types. |
| Class Variable | __code__ |
mimetypes. |
| Class Variable | __message__ |
File must match one of the accepted MIME types.. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _exact |
Exact produced by frozenset. |
| Instance Variable | _prefixes |
Prefixes produced by tuple. |
Inherited from Rule:
| Method | __init |
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. |
overrides
orionis.schemas.rule.Rule.__init__Initialize the rule with the accepted MIME types.
| Parameters | |
*mimestr | MIME types the file may declare, optionally using a wildcard subtype. At least one is required. |
message:str | None, optional | Override message used when validation fails. |
| Returns | |
None | No return value. |
| Raises | |
ValueError | If no MIME type is supplied. |
overrides
orionis.schemas.rule.Rule.__slots__Declare the instance attribute slots reserved by this class.