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 Reservation: (source)
Constructor: Reservation(runtime, state, owner, max_connections, ...)
Hold active or pending capacity while preparing and sending a request.
Release the reservation after either preparation or the exchange finishes.
| Method | __init__ |
Capture the loop, owner and physical connection ceiling. |
| Async Method | _admit |
Wait for this reservation and reject expired or cross-loop work. |
| Method | release |
Return capacity on preparation failure, timeout or completion. |
| Async Method | run |
Execute only admitted I/O in a separately cancellable child task. |
| Instance Variable | active |
Whether the reservation has acquired an active request slot. |
| Instance Variable | generation |
Owned pool generation, or None for a temporary transport. |
| Instance Variable | max |
Physical connection ceiling used when acquiring transport capacity. |
| Instance Variable | released |
Whether the reservation has already returned its capacity. |
| Instance Variable | runtime |
Application registry responsible for retiring the loop when idle. |
| Instance Variable | state |
Loop-local counters and connection budget for this reservation. |
| Instance Variable | stopped |
Whether shutdown revoked the reservation. |
| Instance Variable | waiter |
Admission signal for a queued reservation. |
def __init__(self, runtime:
HttpRuntime, state: _LoopState, owner: _Owner | None, max_connections: int, *, waiting: bool):
(source)
¶
Capture the loop, owner and physical connection ceiling.
| Parameters | |
runtime:HttpRuntime | Application registry that owns this loop state. |
state:_LoopState | Admission counters and generation for the owning loop. |
owner:_Owner | None | Application lifetime holding the pool, if present. |
maxint | Maximum number of physical connections. |
waiting:bool | Whether the request must wait for admission. |
| Returns | |
None | Record the admission state to use when the exchange begins. |
Wait for this reservation and reject expired or cross-loop work.
| Returns | |
None | Proceed once the reservation is admitted and its owner is still valid. |
Return capacity on preparation failure, timeout or completion.
| Returns | |
None | Transfer a released slot to the next eligible waiter, if present. |