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

Class McpHttpPolicy Enforce MCP origin and error rules around the existing HTTP pipeline.
Class McpProtocolResponse Mark encoded protocol output to keep adaptation constant-time.
Function _error Use public status names rather than exception messages or middleware bodies.
Function origin_allowed Accept absent origins and one explicitly configured serialized origin.
Constant _AUTHENTICATION_HEADERS Undocumented
Constant _CLIENT_ERROR_START Undocumented
Constant _EXCEPTION_STATUS Undocumented
Constant _JSON_MEDIA_TYPE Undocumented
Constant _LOGGER Undocumented
Constant _REDIRECTION_START Undocumented
Constant _REPLACED_HEADERS Undocumented
Constant _SERVER_ERROR_START Undocumented
def _error(status: int) -> McpProtocolResponse: (source)

Use public status names rather than exception messages or middleware bodies.

Parameters
status:intValue supplied for status.
Returns
McpProtocolResponseResult of the operation described above.
def origin_allowed(headers: Headers, origins: frozenset[str]) -> bool: (source)

Accept absent origins and one explicitly configured serialized origin.

Parameters
headers:HeadersValue supplied for headers.
origins:frozenset[str]Value supplied for origins.
Returns
boolResult of the operation described above.
_AUTHENTICATION_HEADERS = (source)

Undocumented

Value
frozenset(set(['www-authenticate', 'allow']))
_CLIENT_ERROR_START: int = (source)

Undocumented

Value
400
_EXCEPTION_STATUS = (source)

Undocumented

Value
{AuthenticationException: HTTPStatus.UNAUTHORIZED,
 AuthorizationException: HTTPStatus.FORBIDDEN,
 RouteNotFound: HTTPStatus.NOT_FOUND,
 MethodNotAllowed: HTTPStatus.METHOD_NOT_ALLOWED,
 PayloadTooLargeException: HTTPStatus.REQUEST_ENTITY_TOO_LARGE,
 UnsupportedMediaTypeException: HTTPStatus.UNSUPPORTED_MEDIA_TYPE,
 CSRFTokenMismatchException: HTTPStatus.FORBIDDEN,
...
_JSON_MEDIA_TYPE: str = (source)

Undocumented

Value
'application/json'

Undocumented

Value
logging.getLogger(__name__)
_REDIRECTION_START: int = (source)

Undocumented

Value
300
_REPLACED_HEADERS = (source)

Undocumented

Value
frozenset(set(['content-type', 'content-length', 'location']))
_SERVER_ERROR_START: int = (source)

Undocumented

Value
500