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
| Async Method | __aenter__ |
Enter the asynchronous context and set the current scope. |
| Async Method | __aexit__ |
Exit the asynchronous context and clear the current scope. |
| Method | __contains__ |
Check whether the given key exists in the scope. |
| Method | __getitem__ |
Retrieve the instance associated with the given key. |
| Method | __init__ |
Initialize the ScopeManager. |
| Method | __setitem__ |
Store an instance under the specified key. |
| Method | clear |
Remove all instances from the current scope. |
| Method | creation |
Return the construction lock owned by this scope and service key. |
| Async Method | get |
Retrieve the instance associated with the given key asynchronously. |
| Async Method | resolve |
Resolve and return the instance for a given key. |
| Method | set |
Store an instance in the scope. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | __active |
Undocumented |
| Instance Variable | __closed |
Undocumented |
| Instance Variable | __creation |
Undocumented |
| Instance Variable | _instances |
Undocumented |
| Instance Variable | _token |
Undocumented |
| Property | is |
Report whether the owning scope is still open. |
Enter the asynchronous context and set the current scope.
Sets the current scope in the ScopedContext to this instance.
| Returns | |
Self | The current ScopeManager instance. |
| Raises | |
RuntimeError | If the scope is already active or has previously closed. |
type[ BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None):
(source)
¶
Exit the asynchronous context and clear the current scope.
| Parameters | |
exctype[BaseException] | None | The exception type, if any. |
excBaseException | None | The exception value, if any. |
exctypes.TracebackType | None | The traceback object, if any. |
| Returns | |
None | This method does not return a value. |
Initialize the ScopeManager.
Initializes an empty dictionary to store scoped instances.
| Returns | |
None | This method does not return a value. |
Store an instance under the specified key.
| Parameters | |
key:object | Key to associate with the instance. |
value:object | Instance to store. |
| Returns | |
None | This method does not return a value. |
| Raises | |
RuntimeError | If the scope has already closed. |
Remove all instances from the current scope.
Clears the internal dictionary of all stored instances.
| Returns | |
None | This method does not return a value. |
Return the construction lock owned by this scope and service key.
| Parameters | |
key:object | Contract identifying a scoped service. |
| Returns | |
asyncio.Lock | Lock shared by tasks resolving that service within this scope. |
| Raises | |
RuntimeError | If the scope has already closed. |
Resolve and return the instance for a given key.
This method retrieves the instance associated with the provided key. Raises a KeyError if the instance is not found in the scope.
| Parameters | |
key:object | The key identifying the instance. |
| Returns | |
Any | The resolved instance associated with the key. |
| Raises | |
KeyError | If the instance for the given key is not found in the scope. |