HTTP: from routes to responses
Orionis provides a common HTTP API over ASGI and RSGI. The same controller can receive a normalized request, validate input and return JSON, HTML, a file, a stream or SSE. WebSocket connections use a separate connection API within the same routing system.
You need Python 3.14+, the framework’s declared dependencies and a booted application to use facades and container services. Function examples are application code executed when the kernel handles a request. Examples that only construct responses can run without starting a server.
Create an Orionis project first using installation. The paths below are relative to that application, not to the installed framework package. Route declarations run during application boot; handlers run when a request matches a route.
Check the existing app.withRouting(...) call in bootstrap/app.py: it must register the route files you use, commonly web="routes/web.py" and api="routes/api.py". Creating an unregistered route file does not expose its endpoints. Keep existing arguments when adding another file.
Recommended path
Section titled “Recommended path”- Request lifecycle and controllers: services, scopes and asynchronous execution.
- Routes, parameters and groups: design an API and organize access.
- Input and validation: read metadata and bodies correctly.
- Forms and uploads: repeated input and temporary resources.
- Responses and cookies: JSON, views, redirects and downloads.
- Streaming and SSE: progressive delivery and cleanup.
- WebSocket: connections, messages and middleware.
- Middleware and security: CSRF, CORS, proxies and limits.
- Default pages and routes: health, errors and optional authentication.
Continue with sessions, authentication, schemas, views and Realtime hubs.