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.
Undocumented
| Method | auth |
Register the built-in web authentication routes. |
| Method | delete |
Register a DELETE route. |
| Method | export |
Export all registered routes and the fallback handler. |
| Method | fallback |
Register the fallback handler for unmatched routes (HTTP 404). |
| Method | get |
Register a GET route. |
| Method | group |
Register a group of routes with a shared prefix and middleware. |
| Method | hub |
Register a Hub connection endpoint with a fixed wire codec. |
| Method | patch |
Register a PATCH route. |
| Method | post |
Register a POST route. |
| Method | put |
Register a PUT route. |
| Method | query |
Register a QUERY route. |
| Method | view |
Register a GET route that renders a template with no controller. |
| Method | websocket |
Register a WebSocket connection handler independently of HTTP routes. |
| Class Variable | __slots__ |
Undocumented |
type | None = None, register_controller: type | None = None, forgot_password_controller: type | None = None):
(source)
¶
orionis.http.routes.router.RouterRegister the built-in web authentication routes.
| Parameters | |
logintype | None, optional | Controller for login and logout. Defaults to the built-in controller. |
registertype | None, optional | Controller for registration and email verification. Defaults to the built-in controller. |
forgottype | None, optional | Controller for forgot-password and password-reset routes. Defaults to the built-in controller. |
| Returns | |
None | Routes are registered on this router. |
| Raises | |
ValueError | If registration is attempted outside the web route context. |
orionis.http.routes.router.RouterRegister a DELETE route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterExport all registered routes and the fallback handler.
| Returns | |
dict | A dictionary with two keys:
|
| Raises | |
ValueError | If a registered route still has no action or view. |
orionis.http.routes.router.RouterRegister the fallback handler for unmatched routes (HTTP 404).
Only one fallback may be registered; a second call raises FallbackRouteAlreadyRegisteredException.
| Parameters | |
action:RouteAction | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. Required because fallback registration does not return a fluent route builder. |
| Returns | |
None | The fallback is stored on the instance; no value is returned. |
| Raises | |
FallbackRouteAlreadyRegisteredException | If a fallback handler has already been registered. |
TypeError | If the action is None or is not an accepted handler form. |
ValueError | If a controller pair has an invalid length or names a missing method. |
orionis.http.routes.router.RouterRegister a GET route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
str | None = None, middleware: MiddlewareInput | None = None, without_middleware: MiddlewareInput | None = None, routes: Sequence[ FluentRoute | RouteGroup] | None = None, public: bool | None = None) -> RouteGroup:
(source)
¶
orionis.http.routes.router.RouterRegister a group of routes with a shared prefix and middleware.
| Parameters | |
prefix:str | None, optional | URL prefix prepended to every route path in the group. |
middleware:MiddlewareInput | None, optional | Middleware classes to attach to every route in the group. Accepts a single class or a container of classes. |
withoutMiddlewareInput | None, optional | Middleware classes to exclude from every route in the group. Accepts a single class or a container of classes. |
routes:Sequence[FluentRoute | RouteGroup] | None, optional | Routes or nested groups to include. |
public:bool | None, optional | Stateless profile inherited by descendants without an explicit choice. |
| Returns | |
RouteGroup | Flattened membership for composition by another group. |
| Raises | |
ValueError | If routes is empty or None. |
ValueError | If prefix is not a str. |
ValueError | If any entry in middleware or without_middleware is not a BaseMiddleware subclass. |
TypeError | If membership contains neither routes nor groups. |
orionis.http.routes.router.RouterRegister a Hub connection endpoint with a fixed wire codec.
| Parameters | |
path:str | WebSocket route path, with optional converted parameters. |
hub:type[Hub] | Hub subclass resolved through the application container. |
protocol:str, optional | json by default, or msgpack for binary frames. |
| Returns | |
FluentRoute | Registered Hub route builder. |
orionis.http.routes.router.RouterRegister a PATCH route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterRegister a POST route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterRegister a PUT route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterRegister a QUERY route.
| Parameters | |
path:str | URL path for the route. |
action:RouteAction | None, optional | Callable, invokable controller class (defining __call__), or [ControllerClass, 'method_name'] list. If omitted or None, call action(controller, handler) on the returned route before exporting the router. |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterRegister a GET route that renders a template with no controller.
| Parameters | |
path:str | URL path for the route. |
view:str | Template name in dot notation (e.g. 'welcome') |
| Returns | |
FluentRoute | The registered FluentRoute instance. |
orionis.http.routes.router.RouterRegister a WebSocket connection handler independently of HTTP routes.
| Parameters | |
path:str | Connection path with optional converted parameters. |
action:RouteAction | None, optional | Function, controller action, or invokable controller. |
| Returns | |
FluentRoute | Registered connection route builder. |