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 ASGITransportAdapter(TransportAdapter): (source)
Constructor: ASGITransportAdapter(scope)
Adapt an ASGI scope dictionary to the transport adapter contract.
| Returns | |
None | This class exposes request data accessors and state overrides. |
| Method | __build |
Build a Headers object from ASGI raw headers. |
| Method | __contains__ |
Check whether an override key exists. |
| Method | __delitem__ |
Delete an override value by key. |
| Method | __getitem__ |
Get a cached override value by key. |
| Method | __init__ |
Initialize the adapter with an ASGI scope dictionary. |
| Method | __setitem__ |
Set a cached override value by key. |
| Method | client |
Get the remote client IP from the ASGI scope. |
| Method | get |
Get the adjusted ASGI scope dictionary. |
| Method | headers |
Get request headers. |
| Method | method |
Get the HTTP method. |
| Method | path |
Get the request path. |
| Method | scheme |
Get the URL scheme. |
| Method | set |
Set the remote client address. |
| Method | set |
Set the URL scheme. |
| Method | set |
Set an arbitrary override state value. |
| Method | wants |
Determine whether the client prefers JSON. |
| 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 a Headers object from ASGI raw headers.
| Returns | |
Headers | Return decoded and indexed request headers. |
Get a cached override value by key.
| Parameters | |
key:str | Specify the override key. |
| Returns | |
object | None | Return the stored value, or None when absent. |
Get the remote client IP from the ASGI scope.
| Returns | |
str | None | Return the client IP, or None when unavailable. |
Determine whether the client prefers JSON.
| Returns | |
bool | Return True when Accept includes JSON media types. |