Debian Codegraph @

src/auth0/management/keys/__init__.py

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