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

Undocumented

Method __init__ Initialize the middleware with the given rate-limit configuration.
Async Method close Release an owned Redis connection pool during application shutdown.
Async Method handle Enforce the sliding-window rate limit for the incoming request.
Method isEnabled Report whether rate limiting is active for this application.
Class Variable __slots__ Undocumented
Instance Variable __default_responses Undocumented
Instance Variable __rate_limit_enabled Undocumented
Instance Variable __rate_limit_requests Undocumented
Instance Variable __rate_limit_window_seconds Undocumented
Instance Variable __retry_after_value Undocumented
Instance Variable __store Undocumented
def __init__(self, config: dict, default_responses: IDefaultResponses): (source)

Initialize the middleware with the given rate-limit configuration.

Parameters
config:dictA dictionary whose keys must match HTTPRateLimit fields.
default_responses:IDefaultResponsesPredefined default responses for common HTTP errors.
Returns
NoneUndocumented
async def close(self): (source)

Release an owned Redis connection pool during application shutdown.

Returns
NoneLeave quota state intact while closing network resources.
async def handle(self, adapter: TransportAdapter) -> Response | None: (source)

Enforce the sliding-window rate limit for the incoming request.

Skips enforcement when rate limiting is disabled or when the client IP cannot be resolved. Returns a 429 response on the first request that exceeds the configured quota, or None when the request is within the allowed limit.

Parameters
adapter:TransportAdapterTransport abstraction providing client IP and header negotiation helpers.
Returns
Response | NoneA 429 HTTP response when the limit is exceeded, or None when the request is allowed to proceed.
def isEnabled(self) -> bool: (source)

Report whether rate limiting is active for this application.

Returns
boolTrue when the limiter is enabled, False otherwise.
__slots__: tuple[str, ...] = (source)

Undocumented

__default_responses = (source)

Undocumented

__rate_limit_enabled = (source)

Undocumented

__rate_limit_requests = (source)

Undocumented

__rate_limit_window_seconds = (source)

Undocumented

__retry_after_value = (source)

Undocumented

Undocumented