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
class McpHttpPolicy(IHttpEndpointPolicy): (source)
Constructor: McpHttpPolicy(app, config)
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. |
| Async Method | response |
Preserve protocol output and replace browser bodies with safe errors. |
| Class Variable | __slots__ |
Undocumented |
| Class Variable | monitor |
Undocumented |
| Instance Variable | _app |
Undocumented |
| Instance Variable | _origins |
Undocumented |
Compile an origin set without capturing any request or identity.
| Parameters | |
app:IApplication | Application container supplying configuration and dependencies. |
config:McpConfig | Validated configuration controlling this component. |
| Returns | |
None | Complete the documented operation without returning a value. |
Validate Origin for preflight and unsupported methods as well as POST.
| Parameters | |
adapter:TransportAdapter | Value supplied for adapter. |
| Returns | |
Response | None | Result of the operation described above. |
async def exception(self, exception:
Exception, request: Request | TransportAdapter) -> Response:
(source)
¶