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.

module documentation

Undocumented

Function is_file Report whether a value behaves like an uploaded file.
Function measure Compute the comparable size of a value.
Function read_content Read the whole content of an uploaded file.
Constant _FILE_ATTRIBUTES Undocumented
Constant KILOBYTE Undocumented
def is_file(value: object) -> bool: (source)

Report whether a value behaves like an uploaded file.

Parameters
value:objectValue to inspect.
Returns
boolReturn True when the value exposes the uploaded-file protocol.
def measure(value: object) -> float | None: (source)

Compute the comparable size of a value.

Numbers are compared by their own magnitude, strings and collections by their length, and uploaded files by their size in kilobytes.

Parameters
value:objectValue whose size is required.
Returns
float | NoneComparable size, or None when the value has no measurable size.
def read_content(value: object) -> bytes | None: (source)

Read the whole content of an uploaded file.

Parameters
value:objectUploaded file to read.
Returns
bytes | NoneRaw content, or None when the value is not a readable file.
_FILE_ATTRIBUTES: tuple[str, ...] = (source)

Undocumented

Value
('read', 'size', 'filename')
KILOBYTE: int = (source)

Undocumented

Value
1024