contextbase-base-client 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. base_client/.fern/metadata.json +13 -0
  2. base_client/CONTRIBUTING.md +125 -0
  3. base_client/README.md +176 -0
  4. base_client/__init__.py +159 -0
  5. base_client/_default_clients.py +30 -0
  6. base_client/bases/__init__.py +34 -0
  7. base_client/bases/client.py +256 -0
  8. base_client/bases/raw_client.py +365 -0
  9. base_client/bases/types/__init__.py +34 -0
  10. base_client/bases/types/list_bases_response.py +20 -0
  11. base_client/binding_plan/__init__.py +4 -0
  12. base_client/binding_plan/client.py +108 -0
  13. base_client/binding_plan/raw_client.py +128 -0
  14. base_client/bindings/__init__.py +34 -0
  15. base_client/bindings/client.py +242 -0
  16. base_client/bindings/raw_client.py +326 -0
  17. base_client/bindings/types/__init__.py +34 -0
  18. base_client/bindings/types/list_bindings_response.py +20 -0
  19. base_client/client.py +252 -0
  20. base_client/core/__init__.py +127 -0
  21. base_client/core/api_error.py +23 -0
  22. base_client/core/client_wrapper.py +102 -0
  23. base_client/core/datetime_utils.py +70 -0
  24. base_client/core/file.py +67 -0
  25. base_client/core/force_multipart.py +18 -0
  26. base_client/core/http_client.py +839 -0
  27. base_client/core/http_response.py +59 -0
  28. base_client/core/http_sse/__init__.py +42 -0
  29. base_client/core/http_sse/_api.py +170 -0
  30. base_client/core/http_sse/_decoders.py +61 -0
  31. base_client/core/http_sse/_exceptions.py +7 -0
  32. base_client/core/http_sse/_models.py +17 -0
  33. base_client/core/jsonable_encoder.py +120 -0
  34. base_client/core/logging.py +107 -0
  35. base_client/core/parse_error.py +36 -0
  36. base_client/core/pydantic_utilities.py +508 -0
  37. base_client/core/query_encoder.py +58 -0
  38. base_client/core/remove_none_from_dict.py +11 -0
  39. base_client/core/request_options.py +35 -0
  40. base_client/core/serialization.py +347 -0
  41. base_client/dsn/__init__.py +4 -0
  42. base_client/dsn/client.py +104 -0
  43. base_client/dsn/raw_client.py +128 -0
  44. base_client/errors/__init__.py +38 -0
  45. base_client/errors/bad_request_error.py +11 -0
  46. base_client/errors/forbidden_error.py +11 -0
  47. base_client/reference.md +591 -0
  48. base_client/sync_state/__init__.py +34 -0
  49. base_client/sync_state/client.py +206 -0
  50. base_client/sync_state/raw_client.py +280 -0
  51. base_client/sync_state/types/__init__.py +34 -0
  52. base_client/sync_state/types/sync_state_input_bindings_value.py +23 -0
  53. base_client/tests/conftest.py +21 -0
  54. base_client/tests/test_aiohttp_autodetect.py +113 -0
  55. base_client/types/__init__.py +126 -0
  56. base_client/types/api_key_auth.py +19 -0
  57. base_client/types/authenticated_account_ref.py +20 -0
  58. base_client/types/base.py +23 -0
  59. base_client/types/binding.py +29 -0
  60. base_client/types/binding_auth.py +72 -0
  61. base_client/types/binding_auth_input.py +77 -0
  62. base_client/types/binding_auth_input_api_key.py +19 -0
  63. base_client/types/binding_auth_input_authenticated_account.py +20 -0
  64. base_client/types/binding_auth_input_client_credentials.py +20 -0
  65. base_client/types/binding_auth_input_none.py +17 -0
  66. base_client/types/binding_auth_none.py +17 -0
  67. base_client/types/binding_models.py +23 -0
  68. base_client/types/binding_state.py +24 -0
  69. base_client/types/binding_state_response.py +21 -0
  70. base_client/types/client_credentials_auth.py +20 -0
  71. base_client/types/dagster_all_plan_binding.py +27 -0
  72. base_client/types/dagster_all_plan_binding_mode.py +5 -0
  73. base_client/types/dagster_binding_plan_all.py +23 -0
  74. base_client/types/dsn_response.py +19 -0
  75. base_client/types/error.py +19 -0
  76. base_client/types/run_status.py +10 -0
  77. contextbase_base_client-0.5.0.dist-info/METADATA +10 -0
  78. contextbase_base_client-0.5.0.dist-info/RECORD +79 -0
  79. contextbase_base_client-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "cliVersion": "5.50.3",
3
+ "generatorName": "fernapi/fern-python-sdk",
4
+ "generatorVersion": "5.14.20",
5
+ "generatorConfig": {
6
+ "package_name": "base_client",
7
+ "client_class_name": "BaseAPIClient"
8
+ },
9
+ "originGitCommit": "23e427b68efec26440c8b4b9c5b5b89cd90fa7ce",
10
+ "originGitCommitIsDirty": true,
11
+ "invokedBy": "ci",
12
+ "ciProvider": "github"
13
+ }
@@ -0,0 +1,125 @@
1
+ # Contributing
2
+
3
+ Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.
4
+
5
+ ## Getting Started
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.9+
10
+ - pip
11
+ - poetry
12
+
13
+ ### Installation
14
+
15
+ Install the project dependencies:
16
+
17
+ ```bash
18
+ poetry install
19
+ ```
20
+
21
+ ### Building
22
+
23
+ Build the project:
24
+
25
+ ```bash
26
+ poetry build
27
+ ```
28
+
29
+ ### Testing
30
+
31
+ Run the test suite:
32
+
33
+ ```bash
34
+ poetry run pytest
35
+ ```
36
+
37
+ ### Linting and Formatting
38
+
39
+ Check code style:
40
+
41
+ ```bash
42
+ poetry run ruff check .
43
+ poetry run ruff format .
44
+ ```
45
+
46
+ ### Type Checking
47
+
48
+ Run the type checker:
49
+
50
+ ```bash
51
+ poetry run mypy .
52
+ ```
53
+
54
+ ## About Generated Code
55
+
56
+ **Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.
57
+
58
+ ### Generated Files
59
+
60
+ The following directories contain generated code:
61
+ - `src/` - API client classes and types
62
+ - Most Python files in the project
63
+
64
+ ### How to Customize
65
+
66
+ If you need to customize the SDK, you have two options:
67
+
68
+ #### Option 1: Use `.fernignore`
69
+
70
+ For custom code that should persist across SDK regenerations:
71
+
72
+ 1. Create a `.fernignore` file in the project root
73
+ 2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
74
+ 3. Add your custom code to those files
75
+
76
+ Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.
77
+
78
+ For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).
79
+
80
+ #### Option 2: Contribute to the Generator
81
+
82
+ If you want to change how code is generated for all users of this SDK:
83
+
84
+ 1. The Python SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
85
+ 2. Generator code is located at `generators/python-v2/`
86
+ 3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
87
+ 4. Submit a pull request with your changes to the generator
88
+
89
+ This approach is best for:
90
+ - Bug fixes in generated code
91
+ - New features that would benefit all users
92
+ - Improvements to code generation patterns
93
+
94
+ ## Making Changes
95
+
96
+ ### Workflow
97
+
98
+ 1. Create a new branch for your changes
99
+ 2. Make your modifications
100
+ 3. Run tests to ensure nothing breaks: `poetry run pytest`
101
+ 4. Run linting and formatting: `poetry run ruff check .` and `poetry run ruff format .`
102
+ 5. Run type checking: `poetry run mypy .`
103
+ 6. Build the project: `poetry build`
104
+ 7. Commit your changes with a clear commit message
105
+ 8. Push your branch and create a pull request
106
+
107
+ ### Commit Messages
108
+
109
+ Write clear, descriptive commit messages that explain what changed and why.
110
+
111
+ ### Code Style
112
+
113
+ This project uses automated code formatting and linting. Run `poetry run ruff format .` and `poetry run ruff check .` before committing to ensure your code meets the project's style guidelines.
114
+
115
+ ## Questions or Issues?
116
+
117
+ If you have questions or run into issues:
118
+
119
+ 1. Check the [Fern documentation](https://buildwithfern.com)
120
+ 2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
121
+ 3. Open a new issue if your question hasn't been addressed
122
+
123
+ ## License
124
+
125
+ By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
base_client/README.md ADDED
@@ -0,0 +1,176 @@
1
+ # Contextlayer Python Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Contextlayer%2FPython)
4
+ [![pypi](https://img.shields.io/pypi/v/base_client)](https://pypi.python.org/pypi/base_client)
5
+
6
+ The Contextlayer Python library provides convenient access to the Contextlayer APIs from Python.
7
+
8
+ ## Table of Contents
9
+
10
+ - [Installation](#installation)
11
+ - [Reference](#reference)
12
+ - [Usage](#usage)
13
+ - [Async Client](#async-client)
14
+ - [Exception Handling](#exception-handling)
15
+ - [Advanced](#advanced)
16
+ - [Access Raw Response Data](#access-raw-response-data)
17
+ - [Retries](#retries)
18
+ - [Timeouts](#timeouts)
19
+ - [Custom Client](#custom-client)
20
+ - [Contributing](#contributing)
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ pip install base_client
26
+ ```
27
+
28
+ ## Reference
29
+
30
+ A full reference for this library is available [here](./reference.md).
31
+
32
+ ## Usage
33
+
34
+ Instantiate and use the client with the following:
35
+
36
+ ```python
37
+ from base_client import BaseAPIClient
38
+
39
+ client = BaseAPIClient(
40
+ base_url="https://yourhost.com/path/to/api",
41
+ )
42
+
43
+ client.bases.create_base(
44
+ dsn_secret="dsn_secret",
45
+ name="name",
46
+ )
47
+ ```
48
+
49
+ ## Async Client
50
+
51
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).
52
+
53
+ ```python
54
+ import asyncio
55
+
56
+ from base_client import AsyncBaseAPIClient
57
+
58
+ client = AsyncBaseAPIClient(
59
+ base_url="https://yourhost.com/path/to/api",
60
+ )
61
+
62
+
63
+ async def main() -> None:
64
+ await client.bases.create_base(
65
+ dsn_secret="dsn_secret",
66
+ name="name",
67
+ )
68
+
69
+
70
+ asyncio.run(main())
71
+ ```
72
+
73
+ ## Exception Handling
74
+
75
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
76
+ will be thrown.
77
+
78
+ ```python
79
+ from base_client.core.api_error import ApiError
80
+
81
+ try:
82
+ client.bases.create_base(...)
83
+ except ApiError as e:
84
+ print(e.status_code)
85
+ print(e.body)
86
+ ```
87
+
88
+ ## Advanced
89
+
90
+ ### Access Raw Response Data
91
+
92
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
93
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
94
+
95
+ ```python
96
+ from base_client import BaseAPIClient
97
+
98
+ client = BaseAPIClient(...)
99
+ response = client.bases.with_raw_response.create_base(...)
100
+ print(response.headers) # access the response headers
101
+ print(response.status_code) # access the response status code
102
+ print(response.data) # access the underlying object
103
+ ```
104
+
105
+ ### Retries
106
+
107
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
108
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
109
+ retry limit (default: 2).
110
+
111
+ Which status codes are retried depends on the `retryStatusCodes` generator configuration:
112
+
113
+ **`legacy`** (current default): retries on
114
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
115
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
116
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
117
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500)
118
+
119
+ **`recommended`**: retries on
120
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
121
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
122
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
123
+ - [502](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) (Bad Gateway)
124
+ - [503](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) (Service Unavailable)
125
+ - [504](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) (Gateway Timeout)
126
+
127
+ Use the `max_retries` request option to configure this behavior.
128
+
129
+ ```python
130
+ client.bases.create_base(..., request_options={
131
+ "max_retries": 1
132
+ })
133
+ ```
134
+
135
+ ### Timeouts
136
+
137
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
138
+
139
+ ```python
140
+ from base_client import BaseAPIClient
141
+
142
+ client = BaseAPIClient(..., timeout=20.0)
143
+
144
+ # Override timeout for a specific method
145
+ client.bases.create_base(..., request_options={
146
+ "timeout_in_seconds": 1
147
+ })
148
+ ```
149
+
150
+ ### Custom Client
151
+
152
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
153
+ and transports.
154
+
155
+ ```python
156
+ import httpx
157
+ from base_client import BaseAPIClient
158
+
159
+ client = BaseAPIClient(
160
+ ...,
161
+ httpx_client=httpx.Client(
162
+ proxy="http://my.test.proxy.example.com",
163
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
164
+ ),
165
+ )
166
+ ```
167
+
168
+ ## Contributing
169
+
170
+ While we value open-source contributions to this SDK, this library is generated programmatically.
171
+ Additions made directly to this library would have to be moved over to our generation code,
172
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
173
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
174
+ an issue first to discuss with us!
175
+
176
+ On the other hand, contributions to the README are always very welcome!
@@ -0,0 +1,159 @@
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 .types import (
10
+ ApiKeyAuth,
11
+ AuthenticatedAccountRef,
12
+ Base,
13
+ Binding,
14
+ BindingAuth,
15
+ BindingAuthInput,
16
+ BindingAuthInputApiKey,
17
+ BindingAuthInputAuthenticatedAccount,
18
+ BindingAuthInputClientCredentials,
19
+ BindingAuthInputNone,
20
+ BindingAuthInput_ApiKey,
21
+ BindingAuthInput_AuthenticatedAccount,
22
+ BindingAuthInput_ClientCredentials,
23
+ BindingAuthInput_None,
24
+ BindingAuthNone,
25
+ BindingAuth_ApiKey,
26
+ BindingAuth_AuthenticatedAccount,
27
+ BindingAuth_ClientCredentials,
28
+ BindingAuth_None,
29
+ BindingModels,
30
+ BindingState,
31
+ BindingStateResponse,
32
+ ClientCredentialsAuth,
33
+ DagsterAllPlanBinding,
34
+ DagsterAllPlanBindingMode,
35
+ DagsterBindingPlanAll,
36
+ DsnResponse,
37
+ Error,
38
+ RunStatus,
39
+ )
40
+ from .errors import BadRequestError, ForbiddenError
41
+ from . import bases, binding_plan, bindings, dsn, sync_state
42
+ from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
43
+ from .bases import ListBasesResponse
44
+ from .bindings import ListBindingsResponse
45
+ from .client import AsyncBaseAPIClient, BaseAPIClient
46
+ from .sync_state import SyncStateInputBindingsValue
47
+ _dynamic_imports: typing.Dict[str, str] = {
48
+ "ApiKeyAuth": ".types",
49
+ "AsyncBaseAPIClient": ".client",
50
+ "AuthenticatedAccountRef": ".types",
51
+ "BadRequestError": ".errors",
52
+ "Base": ".types",
53
+ "BaseAPIClient": ".client",
54
+ "Binding": ".types",
55
+ "BindingAuth": ".types",
56
+ "BindingAuthInput": ".types",
57
+ "BindingAuthInputApiKey": ".types",
58
+ "BindingAuthInputAuthenticatedAccount": ".types",
59
+ "BindingAuthInputClientCredentials": ".types",
60
+ "BindingAuthInputNone": ".types",
61
+ "BindingAuthInput_ApiKey": ".types",
62
+ "BindingAuthInput_AuthenticatedAccount": ".types",
63
+ "BindingAuthInput_ClientCredentials": ".types",
64
+ "BindingAuthInput_None": ".types",
65
+ "BindingAuthNone": ".types",
66
+ "BindingAuth_ApiKey": ".types",
67
+ "BindingAuth_AuthenticatedAccount": ".types",
68
+ "BindingAuth_ClientCredentials": ".types",
69
+ "BindingAuth_None": ".types",
70
+ "BindingModels": ".types",
71
+ "BindingState": ".types",
72
+ "BindingStateResponse": ".types",
73
+ "ClientCredentialsAuth": ".types",
74
+ "DagsterAllPlanBinding": ".types",
75
+ "DagsterAllPlanBindingMode": ".types",
76
+ "DagsterBindingPlanAll": ".types",
77
+ "DefaultAioHttpClient": "._default_clients",
78
+ "DefaultAsyncHttpxClient": "._default_clients",
79
+ "DsnResponse": ".types",
80
+ "Error": ".types",
81
+ "ForbiddenError": ".errors",
82
+ "ListBasesResponse": ".bases",
83
+ "ListBindingsResponse": ".bindings",
84
+ "RunStatus": ".types",
85
+ "SyncStateInputBindingsValue": ".sync_state",
86
+ "bases": ".bases",
87
+ "binding_plan": ".binding_plan",
88
+ "bindings": ".bindings",
89
+ "dsn": ".dsn",
90
+ "sync_state": ".sync_state",
91
+ }
92
+
93
+
94
+ def __getattr__(attr_name: str) -> typing.Any:
95
+ module_name = _dynamic_imports.get(attr_name)
96
+ if module_name is None:
97
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
98
+ try:
99
+ module = import_module(module_name, __package__)
100
+ if module_name == f".{attr_name}":
101
+ return module
102
+ else:
103
+ return getattr(module, attr_name)
104
+ except ImportError as e:
105
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
106
+ except AttributeError as e:
107
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
108
+
109
+
110
+ def __dir__():
111
+ lazy_attrs = list(_dynamic_imports.keys())
112
+ return sorted(lazy_attrs)
113
+
114
+
115
+ __all__ = [
116
+ "ApiKeyAuth",
117
+ "AsyncBaseAPIClient",
118
+ "AuthenticatedAccountRef",
119
+ "BadRequestError",
120
+ "Base",
121
+ "BaseAPIClient",
122
+ "Binding",
123
+ "BindingAuth",
124
+ "BindingAuthInput",
125
+ "BindingAuthInputApiKey",
126
+ "BindingAuthInputAuthenticatedAccount",
127
+ "BindingAuthInputClientCredentials",
128
+ "BindingAuthInputNone",
129
+ "BindingAuthInput_ApiKey",
130
+ "BindingAuthInput_AuthenticatedAccount",
131
+ "BindingAuthInput_ClientCredentials",
132
+ "BindingAuthInput_None",
133
+ "BindingAuthNone",
134
+ "BindingAuth_ApiKey",
135
+ "BindingAuth_AuthenticatedAccount",
136
+ "BindingAuth_ClientCredentials",
137
+ "BindingAuth_None",
138
+ "BindingModels",
139
+ "BindingState",
140
+ "BindingStateResponse",
141
+ "ClientCredentialsAuth",
142
+ "DagsterAllPlanBinding",
143
+ "DagsterAllPlanBindingMode",
144
+ "DagsterBindingPlanAll",
145
+ "DefaultAioHttpClient",
146
+ "DefaultAsyncHttpxClient",
147
+ "DsnResponse",
148
+ "Error",
149
+ "ForbiddenError",
150
+ "ListBasesResponse",
151
+ "ListBindingsResponse",
152
+ "RunStatus",
153
+ "SyncStateInputBindingsValue",
154
+ "bases",
155
+ "binding_plan",
156
+ "bindings",
157
+ "dsn",
158
+ "sync_state",
159
+ ]
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import httpx
6
+
7
+ SDK_DEFAULT_TIMEOUT = 60
8
+
9
+ try:
10
+ import httpx_aiohttp # type: ignore[import-not-found]
11
+ except ImportError:
12
+
13
+ class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore
14
+ def __init__(self, **kwargs: typing.Any) -> None:
15
+ raise RuntimeError("To use the aiohttp client, install the aiohttp extra: pip install base_client[aiohttp]")
16
+
17
+ else:
18
+
19
+ class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
20
+ def __init__(self, **kwargs: typing.Any) -> None:
21
+ kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
22
+ kwargs.setdefault("follow_redirects", True)
23
+ super().__init__(**kwargs)
24
+
25
+
26
+ class DefaultAsyncHttpxClient(httpx.AsyncClient):
27
+ def __init__(self, **kwargs: typing.Any) -> None:
28
+ kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
29
+ kwargs.setdefault("follow_redirects", True)
30
+ super().__init__(**kwargs)
@@ -0,0 +1,34 @@
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 .types import ListBasesResponse
10
+ _dynamic_imports: typing.Dict[str, str] = {"ListBasesResponse": ".types"}
11
+
12
+
13
+ def __getattr__(attr_name: str) -> typing.Any:
14
+ module_name = _dynamic_imports.get(attr_name)
15
+ if module_name is None:
16
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17
+ try:
18
+ module = import_module(module_name, __package__)
19
+ if module_name == f".{attr_name}":
20
+ return module
21
+ else:
22
+ return getattr(module, attr_name)
23
+ except ImportError as e:
24
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25
+ except AttributeError as e:
26
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27
+
28
+
29
+ def __dir__():
30
+ lazy_attrs = list(_dynamic_imports.keys())
31
+ return sorted(lazy_attrs)
32
+
33
+
34
+ __all__ = ["ListBasesResponse"]