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

Ensure an uploaded image satisfies the given dimension constraints.

Function _parse_ratio Normalize a ratio constraint into a floating point value.
def _parse_ratio(raw: object, name: str) -> float | None: (source)

Normalize a ratio constraint into a floating point value.

Parameters
raw:objectRatio expressed as a number or as a "width/height" string.
name:strConstraint name reported when the value cannot be parsed.
Returns
float | NoneParsed ratio, or None when no constraint was supplied.
Raises
ValueErrorIf the value cannot be parsed as a finite number or fraction.