langfuse.api.projects

 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 (
10        ApiKeyDeletionResponse,
11        ApiKeyList,
12        ApiKeyResponse,
13        ApiKeySummary,
14        Organization,
15        Project,
16        ProjectDeletionResponse,
17        Projects,
18    )
19_dynamic_imports: typing.Dict[str, str] = {
20    "ApiKeyDeletionResponse": ".types",
21    "ApiKeyList": ".types",
22    "ApiKeyResponse": ".types",
23    "ApiKeySummary": ".types",
24    "Organization": ".types",
25    "Project": ".types",
26    "ProjectDeletionResponse": ".types",
27    "Projects": ".types",
28}
29
30
31def __getattr__(attr_name: str) -> typing.Any:
32    module_name = _dynamic_imports.get(attr_name)
33    if module_name is None:
34        raise AttributeError(
35            f"No {attr_name} found in _dynamic_imports for module name -> {__name__}"
36        )
37    try:
38        module = import_module(module_name, __package__)
39        if module_name == f".{attr_name}":
40            return module
41        else:
42            return getattr(module, attr_name)
43    except ImportError as e:
44        raise ImportError(
45            f"Failed to import {attr_name} from {module_name}: {e}"
46        ) from e
47    except AttributeError as e:
48        raise AttributeError(
49            f"Failed to get {attr_name} from {module_name}: {e}"
50        ) from e
51
52
53def __dir__():
54    lazy_attrs = list(_dynamic_imports.keys())
55    return sorted(lazy_attrs)
56
57
58__all__ = [
59    "ApiKeyDeletionResponse",
60    "ApiKeyList",
61    "ApiKeyResponse",
62    "ApiKeySummary",
63    "Organization",
64    "Project",
65    "ProjectDeletionResponse",
66    "Projects",
67]
ApiKeyDeletionResponse
ApiKeyList
ApiKeyResponse
ApiKeySummary
Organization
Project
ProjectDeletionResponse
Projects