langfuse.api.sessions

 1# This file was auto-generated by Fern from our API Definition.
 2
 3# isort: skip_file
 4
 5import typing
 6from importlib import import_module
 7
 8if typing.TYPE_CHECKING:
 9    from .types import PaginatedSessions
10_dynamic_imports: typing.Dict[str, str] = {"PaginatedSessions": ".types"}
11
12
13def __getattr__(attr_name: str) -> typing.Any:
14    module_name = _dynamic_imports.get(attr_name)
15    if module_name is None:
16        raise AttributeError(
17            f"No {attr_name} found in _dynamic_imports for module name -> {__name__}"
18        )
19    try:
20        module = import_module(module_name, __package__)
21        if module_name == f".{attr_name}":
22            return module
23        else:
24            return getattr(module, attr_name)
25    except ImportError as e:
26        raise ImportError(
27            f"Failed to import {attr_name} from {module_name}: {e}"
28        ) from e
29    except AttributeError as e:
30        raise AttributeError(
31            f"Failed to get {attr_name} from {module_name}: {e}"
32        ) from e
33
34
35def __dir__():
36    lazy_attrs = list(_dynamic_imports.keys())
37    return sorted(lazy_attrs)
38
39
40__all__ = ["PaginatedSessions"]
PaginatedSessions