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 RSGITransportAdapter(TransportAdapter): (source)
Constructor: RSGITransportAdapter(scope)
Adapt a Granian RSGI scope to the transport adapter contract.
| Returns | |
None | This class exposes request data accessors and state overrides. |
| Method | __build |
Build headers from the scope and cache them. |
| Method | __contains__ |
Check whether a state key exists. |
| Method | __delitem__ |
Remove a state value by key. |
| Method | __getitem__ |
Return a cached state value by key. |
| Method | __init__ |
Initialize the adapter with a Granian RSGI scope. |
| Method | __setitem__ |
Store a state value under a key. |
| Method | client |
Return the remote client IP parsed from the scope. |
| Method | get |
Build and return a dictionary view of the request scope. |
| Method | headers |
Return parsed request headers. |
| Method | method |
Return the HTTP method. |
| Method | path |
Return the request path. |
| Method | scheme |
Return the request scheme. |
| Method | set |
Set the remote client IP in the override state. |
| Method | set |
Set the request scheme in the override state. |
| Method | set |
Store a custom value in the override state. |
| Method | wants |
Determine whether the request prefers a JSON response. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | __client |
Undocumented |
| Instance Variable | __headers |
Undocumented |
| Instance Variable | __overrides |
Undocumented |
| Instance Variable | __scope |
Undocumented |
| Instance Variable | __wants |
Undocumented |
Build headers from the scope and cache them.
| Returns | |
Headers | Return parsed headers as lowercase name/value pairs. |
Return a cached state value by key.
| Parameters | |
key:str | The key to look up in the cache. |
| Returns | |
object | None | Return the stored value when present, otherwise None. |
Initialize the adapter with a Granian RSGI scope.
| Parameters | |
scope:Scope | The Granian RSGI scope object. |
| Returns | |
None | Return None after preparing internal caches and state. |
Return the remote client IP parsed from the scope.
| Returns | |
str | None | Return the client IP without IPv6 brackets, or None when unavailable. |
Build and return a dictionary view of the request scope.
| Returns | |
dict | Return base scope fields merged with override values. |
Return parsed request headers.
| Returns | |
Headers | Return the cached Headers instance built at initialization. |
Return the request scheme.
| Returns | |
str | None | Return the override value when set, else the scope scheme. |
Determine whether the request prefers a JSON response.
| Returns | |
bool | Return True when the Accept header indicates JSON support. |