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.

class documentation

Enforce MCP origin and error rules around the existing HTTP pipeline.

Method __init__ Compile an origin set without capturing any request or identity.
Method before Validate Origin for preflight and unsupported methods as well as POST.
Async Method exception Report failures without calling the native HTML/debug presenter.
Method isExpectedFailure Identify expected MCP protocol and mapped HTTP policy failures.
Async Method response Preserve protocol output and replace browser bodies with safe errors.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Class Variable monitor_disconnects Monitor disconnects flag used by McpHttpPolicy.
Instance Variable _app Application container supplying configuration and dependencies.
Instance Variable _origins Origins produced by frozenset.
def __init__(self, app: IApplication, config: McpConfig): (source)

Compile an origin set without capturing any request or identity.

Parameters
app:orionis.IApplicationApplication container supplying configuration and dependencies.
config:orionis.mcp.config.McpConfigValidated configuration controlling this component.
Returns
NoneComplete the documented operation without returning a value.
def before(self, adapter: TransportAdapter) -> Response | None: (source)

Validate Origin for preflight and unsupported methods as well as POST.

Parameters
adapter:orionis.http.adapters.request.contracts.transport.TransportAdapterValue supplied for adapter.
Returns
orionis.http.Response | NoneResult of the operation described above.
async def exception(self, exception: Exception, request: Request | TransportAdapter) -> Response: (source)

Report failures without calling the native HTML/debug presenter.

Parameters
exception:ExceptionException being inspected or reported.
request:Request | TransportAdapterCurrent request and its trusted execution context.
Returns
orionis.http.ResponseResult of the operation described above.
def isExpectedFailure(self, exception: BaseException) -> bool: (source)

Identify expected MCP protocol and mapped HTTP policy failures.

Parameters
exception:BaseExceptionFailure to classify before HTTP observation.
Returns
boolTrue for MCP protocol errors with status below 500 or for mapped policy exception types, including subclasses; otherwise False.
async def response(self, response: Response) -> Response: (source)

Preserve protocol output and replace browser bodies with safe errors.

Parameters
response:orionis.http.ResponseValue supplied for response.
Returns
orionis.http.ResponseResult of the operation described above.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

monitor_disconnects: ClassVar[bool] = (source)

Monitor disconnects flag used by McpHttpPolicy.

Application container supplying configuration and dependencies.

_origins = (source)

Origins produced by frozenset.