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

Parse and expose HTTP headers with case-insensitive lookup.

Class Headers Parse and expose HTTP headers with case-insensitive lookup.
Function _validate_header Reject malformed outgoing field names and values before transport emission.
Constant _HEADER_CONTROLS Field-value controls other than the permitted horizontal tab.
Constant _HEADER_NAME HTTP field-name token, excluding separators and non-ASCII characters.
def _validate_header(name: str, value: str): (source)

Reject malformed outgoing field names and values before transport emission.

Parameters
name:strHeader field name.
value:strHeader field value, allowing horizontal tabs and Latin-1 text.
Returns
NoneNo return value.
Raises
TypeErrorIf the name or value is not a string.
ValueErrorIf the name is not an HTTP token or the value contains unsafe controls.
_HEADER_CONTROLS = (source)

Field-value controls other than the permitted horizontal tab.

Value
re.compile(r'[\x00-\x08\n-\x1f\x7f]')
_HEADER_NAME = (source)

HTTP field-name token, excluding separators and non-ASCII characters.

Value
re.compile(r'[!#\$%&\'\*\+\.\^_`\|~0-9A-Za-z-]+\Z')