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.
Undocumented
| Function | _split |
Split header segments at semicolons outside quoted parameter values. |
| Function | parse |
Return a binary payload unchanged. |
| Function | parse |
Parse a Content-Type header into a media-type and parameter dict. |
| Function | parse |
Decode a JSON payload using msgspec. |
| Function | parse |
Decode a MessagePack payload using msgspec. |
| Function | parse |
Decode a UTF-8 text payload. |
| Function | parse |
Decode an application/x-www-form-urlencoded payload. |
| Function | parse |
Decode a URL-encoded payload, preserving duplicate-key semantics. |
| Function | parse |
Parse an XML payload with entity declarations disabled. |
Split header segments at semicolons outside quoted parameter values.
Quotes open only at the first non-whitespace character after the first equals sign in a segment. Escaped characters cannot close a quoted value. Segments retain their whitespace, quotes and escapes for the caller. An unterminated quoted value consumes the remainder of the header.
| Parameters | |
header:str | Header or parameter text to split. |
quotestr, optional | Characters that may delimit a quoted value; double quotes by default. |
| Returns | |
list[str] | Original segments, excluding their separating semicolons. |
Parse a Content-Type header into a media-type and parameter dict.
Semicolons inside double-quoted parameter values are preserved.
| Parameters | |
header:str | Raw Content-Type value, e.g. "multipart/form-data; boundary=----WebKit". |
| Returns | |
tuple[str, dict[str, str]] | (media_type, params) where media_type is lowercase and params maps lowercase parameter names to unquoted values. |
Decode a URL-encoded payload, preserving duplicate-key semantics.
A key that appears once yields a plain string value. A key that appears more than once yields a list of strings in insertion order.
| Parameters | |
raw:bytes | URL-encoded bytes. |
| Returns | |
dict[str, str | list[str]] | Parsed fields where single occurrences are scalars and repeated occurrences are lists. |
Parse an XML payload with entity declarations disabled.
Uses defusedxml to reject internal and external entity declarations. DTDs without entity declarations are allowed; external resources are not resolved.
| Parameters | |
raw:bytes | Raw XML bytes. |
| Returns | |
xml.etree.ElementTree.Element | Root element of the parsed document. |
| Raises | |
xml.etree.ElementTree.ParseError | If raw is malformed XML. |
defusedxml.common.EntitiesForbidden | If the document declares an internal or external entity. This is a subclass of defusedxml.common.DefusedXmlException, not ParseError. |