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

Open scopes on the supplied container; never create a parallel application.

Method __init__ Reuse native service bindings and one compiled server.
Async Method request Collect a finite exchange; use stream() for subscriptions.
Async Method stream Keep the existing application's scope alive through the entire stream.
Async Method tool Invoke a tool through JSON-RPC input and output bytes.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable app Application container supplying configuration and dependencies.
Instance Variable dispatcher Dispatcher sharing this client's configuration and event bus.
def __init__(self, app: IContainer, server: type[Server] | CompiledMcpServer, config: McpConfig | None = None): (source)

Reuse native service bindings and one compiled server.

Parameters
app:orionis.container.contracts.container.IContainerApplication container supplying configuration and dependencies.
server:type[orionis.mcp.server.primitives.Server] | CompiledMcpServerServer declaration to compile, or an existing compiled server.
config:orionis.mcp.config.McpConfig | None, optionalProtocol limits; use the default configuration when omitted.
Returns
NoneNo return value.
async def request(self, method: str, params: dict[str, object] | None = None, *, meta: dict[str, object] | None = None, request_id: str | int = 1) -> McpTestResponse: (source)

Collect a finite exchange; use stream() for subscriptions.

Parameters
method:strJSON-RPC method to invoke.
params:dict[str, object] | None, optionalMethod parameters, defaulting to an empty mapping.
meta:dict[str, object] | None, optionalRequest metadata overriding the default version and capabilities.
request_id:str | int, optionalCorrelation identifier, defaulting to 1.
Returns
orionis.test.McpTestResponseFinal response and preceding notifications in wire order.
async def stream(self, method: str, params: dict[str, object] | None = None, *, meta: dict[str, object] | None = None, request_id: str | int = 1) -> AsyncIterator[dict[str, object]]: (source)

Keep the existing application's scope alive through the entire stream.

Parameters
method:strJSON-RPC method to invoke.
params:dict[str, object] | None, optionalMethod parameters, defaulting to an empty mapping.
meta:dict[str, object] | None, optionalRequest metadata overriding the default version and capabilities.
request_id:str | int, optionalCorrelation identifier, defaulting to 1.
Yields
dict[str, object]Each decoded notification or final response in wire order.
async def tool(self, name: str, arguments: dict[str, object] | None = None) -> McpTestResponse: (source)

Invoke a tool through JSON-RPC input and output bytes.

Parameters
name:strRegistered tool name.
arguments:dict[str, object] | None, optionalTool input fields, defaulting to an empty mapping.
Returns
orionis.test.McpTestResponseSerialized tool result and preceding notifications.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Application container supplying configuration and dependencies.

dispatcher = (source)

Dispatcher sharing this client's configuration and event bus.