fakts
Fakts Objects​
class Fakts(KoiledModel)
load_on_enter​
Should we load on connect?
delete_on_exit​
Should we delete on connect?
aget​
async def aget(group_name: str, bypass_middleware=False, auto_load=False, validate: BaseModel = None)
Get Config
Gets the currently active configuration for the group_name. This is a loop save function, and will guard the current fakts state through an async lock.
Steps:
- Acquire lock.
- If not yet loaded and auto_load is True, load (reloading should be done seperatily)
- Pass through middleware (can be opt out by setting bypass_iddleware to True)
- Return groups fakts
Arguments:
group_namestr - The group name in the faktsbypass_middlewarebool, optional - Bypasses the Middleware (e.g. no overwrites). Defaults to False.auto_loadbool, optional - Should we autoload the configuration through grants if nothing has been set? Defaults to True.
Returns:
dict- The active fakts