pysepal.solara.utils.get_current_sepal_client#
- pysepal.solara.utils.get_current_sepal_client(module_name=None)[source]#
Returns a SepalClient for the current runtime’s session.
One session holds one client per module name; without
module_nameyou get the client of the route currently rendering (themodule_nameof the innermost@with_sepal_sessionsentered).- Parameters:
module_name (str | None) – Return the client for this module instead of the active one.
- Returns:
The client, or None when there is no session, no such module client, or no SEPAL identity for this process (a notebook or script outside a SEPAL sandbox, where file I/O goes to the local filesystem).
- Return type:
SepalClient | None