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
Undocumented
| Method | __init__ |
Initialize the Inspire service with a list of inspirational quotes. |
| Method | random |
Return a random inspirational quote from the available list. |
| Constant | _FALLBACK |
Undocumented |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _count |
Undocumented |
| Instance Variable | _quotes |
Undocumented |
Initialize the Inspire service with a list of inspirational quotes.
| Parameters | |
quotes:list[dict] | None, optional | List of dictionaries, each containing 'quote' (str) and 'author' (str). If None or empty, defaults to INSPIRATIONAL_QUOTES. |
| Returns | |
None | This method initializes the internal state of the Inspire service. |
| Raises | |
TypeError | If any item is not a dict. |
ValueError | If any item is missing 'quote' or 'author' keys. |
Return a random inspirational quote from the available list.
Select a random quote from the internal list of inspirational quotes. If the list is empty, return a fallback quote to ensure a valid response.
| Returns | |
dict | Dictionary with 'quote' (str) and 'author' (str) keys. If no quotes are available, returns the fallback quote. |