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

Own one compiled registry shared by native HTTP, STDIO, DI and the facade.

Method __init__ Capture application services without opening transports or performing I/O.
Method _compile Validate and compile a server exactly once per application manager.
Async Method _publish Scope events to a declaration already registered in this application.
Async Method dispatchHttp Use the same server and invoker reached by its local registration.
Method finalizeRoutes Index final fluent paths once at boot, preserving constant-time dispatch.
Method getLocalServer Return compiled local metadata by its configured handle.
Method getWebServer Return compiled HTTP metadata by normalized native route path.
Method local Register an explicit handle without accepting dynamic module imports.
Async Method promptsChanged Publish a prompt catalog change to the matching server's listeners.
Async Method resourcesChanged Publish a resource catalog change to the matching server's listeners.
Async Method resourceUpdated Publish one changed URI without resolving its content or identity.
Method servers Return an immutable transport/address/declaration inventory.
Async Method shutdown Wake subscriptions so their request owners can complete and clean up.
Async Method startLocal Serve only a configured local handle using native standard streams.
Async Method toolsChanged Publish a catalog change without retaining the current identity.
Method web Register one native POST endpoint with API authentication semantics.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _app Application container supplying configuration and dependencies.
Instance Variable _bus Value supplied for bus.
Instance Variable _compiled Compiled server metadata indexed by the original server class.
Instance Variable _config Validated configuration controlling this component.
Instance Variable _local Compiled servers indexed by their local STDIO registration names.
Instance Variable _router Value supplied for router.
Instance Variable _web HTTP routes, compiled servers and transports indexed by endpoint path.
def __init__(self, app: IApplication, router: IRouter, config: McpConfig, bus: IMcpEventBus): (source)

Capture application services without opening transports or performing I/O.

Parameters
app:orionis.IApplicationApplication container supplying configuration and dependencies.
router:orionis.http.routes.contracts.router.IRouterValue supplied for router.
config:orionis.mcp.config.McpConfigValidated configuration controlling this component.
bus:orionis.mcp.contracts.event_bus.IMcpEventBusValue supplied for bus.
Returns
NoneComplete the documented operation without returning a value.
def _compile(self, server: type[Server]) -> CompiledMcpServer: (source)

Validate and compile a server exactly once per application manager.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
Returns
orionis.mcp.server.compiler.CompiledMcpServerResult of the operation described above.
async def _publish(self, server: type[Server], method: str, uri: str | None = None): (source)

Scope events to a declaration already registered in this application.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
method:strValue supplied for method.
uri:str | NoneValue supplied for uri.
Returns
NoneComplete the documented operation without returning a value.
async def dispatchHttp(self, request: http_module.Request) -> http_module.Response: (source)

Use the same server and invoker reached by its local registration.

Parameters
request:orionis.http.RequestCurrent request and its trusted execution context.
Returns
orionis.http.ResponseResult of the operation described above.
def finalizeRoutes(self): (source)

Index final fluent paths once at boot, preserving constant-time dispatch.

Returns
NoneComplete the documented operation without returning a value.
def getLocalServer(self, name: str) -> CompiledMcpServer: (source)

Return compiled local metadata by its configured handle.

Parameters
name:strValue supplied for name.
Returns
orionis.mcp.server.compiler.CompiledMcpServerCompiled local metadata by its configured handle.
def getWebServer(self, path: str) -> CompiledMcpServer: (source)

Return compiled HTTP metadata by normalized native route path.

Parameters
path:strValue supplied for path.
Returns
orionis.mcp.server.compiler.CompiledMcpServerCompiled HTTP metadata by normalized native route path.
def local(self, name: str, server: type[Server]): (source)

Register an explicit handle without accepting dynamic module imports.

Parameters
name:strValue supplied for name.
server:type[orionis.mcp.Server]Value supplied for server.
Returns
NoneComplete the documented operation without returning a value.
async def promptsChanged(self, server: type[Server]): (source)

Publish a prompt catalog change to the matching server's listeners.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
Returns
NoneComplete the documented operation without returning a value.
async def resourcesChanged(self, server: type[Server]): (source)

Publish a resource catalog change to the matching server's listeners.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
Returns
NoneComplete the documented operation without returning a value.
async def resourceUpdated(self, server: type[Server], uri: str): (source)

Publish one changed URI without resolving its content or identity.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
uri:strValue supplied for uri.
Returns
NoneComplete the documented operation without returning a value.
def servers(self) -> tuple[tuple[str, str, type[Server]], ...]: (source)

Return an immutable transport/address/declaration inventory.

Returns
tuple[tuple[str, str, type[orionis.mcp.Server]], ...]An immutable transport/address/declaration inventory.
async def shutdown(self): (source)

Wake subscriptions so their request owners can complete and clean up.

Returns
NoneComplete the documented operation without returning a value.
async def startLocal(self, name: str): (source)

Serve only a configured local handle using native standard streams.

Parameters
name:strHandle of an explicitly registered local server.
Returns
NoneFinish when the STDIO transport closes.
Raises
KeyErrorIf no local server is registered under the handle.
async def toolsChanged(self, server: type[Server]): (source)

Publish a catalog change without retaining the current identity.

Parameters
server:type[orionis.mcp.Server]Value supplied for server.
Returns
NoneComplete the documented operation without returning a value.
def web(self, path: str, server: type[Server]) -> FluentRoute: (source)

Register one native POST endpoint with API authentication semantics.

Parameters
path:strFixed endpoint path without URI parameters, query strings or fragments.
server:type[orionis.mcp.Server]Server declaration to compile and bind to the endpoint.
Returns
orionis.http.routes.fluent.FluentRouteAPI POST route bound to the server's HTTP transport.
Raises
TypeErrorIf the path is not a string or the declaration is not a Server subclass.
ValueErrorIf the endpoint is invalid, already registered or its metadata is invalid.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Application container supplying configuration and dependencies.

Value supplied for bus.

Compiled server metadata indexed by the original server class.

Validated configuration controlling this component.

Compiled servers indexed by their local STDIO registration names.

Value supplied for router.

HTTP routes, compiled servers and transports indexed by endpoint path.