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

Normalize server operations without owning application lifecycle state.

Async Method accept Complete the pending handshake.
Async Method close Close the underlying connection.
Async Method receive Receive one normalized server event.
Async Method reject Reject an unaccepted handshake.
Async Method sendBytes Await binary delivery and server backpressure.
Async Method sendText Await text delivery and server backpressure.
Class Variable __slots__ Undocumented
Property supportsCloseDetails Declare whether custom close details can reach the wire.
async def accept(self, *, subprotocol: str | None = None, headers: Mapping[str, str] | None = None): (source)

Complete the pending handshake.

Parameters
subprotocol:str | None, optionalNegotiated client-offered subprotocol.
headers:Mapping[str, str] | None, optionalAdditional handshake response headers when supported.
Returns
NoneAwait server acceptance.
async def close(self, code: int = 1000, reason: str = ''): (source)

Close the underlying connection.

Parameters
code:int, optionalValid WebSocket close code.
reason:str, optionalUTF-8 close reason.
Returns
NoneComplete the close operation.
async def receive(self) -> WebSocketMessage: (source)

Receive one normalized server event.

Returns
WebSocketMessageText, binary or disconnect event.
async def reject(self, status_code: int = 403): (source)

Reject an unaccepted handshake.

Parameters
status_code:int, optionalHTTP rejection status when supported.
Returns
NoneComplete handshake denial.
async def sendBytes(self, data: bytes): (source)

Await binary delivery and server backpressure.

Parameters
data:bytesBinary payload.
Returns
NoneComplete the server write.
async def sendText(self, data: str): (source)

Await text delivery and server backpressure.

Parameters
data:strText payload.
Returns
NoneComplete the server write.
supportsCloseDetails: bool = (source)

Declare whether custom close details can reach the wire.

Returns
boolTrue when the server supports close codes and reasons.