mirascope 2.0.0a3__py3-none-any.whl → 2.0.0a5__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.
- mirascope/api/_generated/__init__.py +78 -6
- mirascope/api/_generated/api_keys/__init__.py +7 -0
- mirascope/api/_generated/api_keys/client.py +453 -0
- mirascope/api/_generated/api_keys/raw_client.py +853 -0
- mirascope/api/_generated/api_keys/types/__init__.py +9 -0
- mirascope/api/_generated/api_keys/types/api_keys_create_response.py +36 -0
- mirascope/api/_generated/api_keys/types/api_keys_get_response.py +35 -0
- mirascope/api/_generated/api_keys/types/api_keys_list_response_item.py +35 -0
- mirascope/api/_generated/client.py +14 -0
- mirascope/api/_generated/environments/__init__.py +17 -0
- mirascope/api/_generated/environments/client.py +532 -0
- mirascope/api/_generated/environments/raw_client.py +1088 -0
- mirascope/api/_generated/environments/types/__init__.py +15 -0
- mirascope/api/_generated/environments/types/environments_create_response.py +26 -0
- mirascope/api/_generated/environments/types/environments_get_response.py +26 -0
- mirascope/api/_generated/environments/types/environments_list_response_item.py +26 -0
- mirascope/api/_generated/environments/types/environments_update_response.py +26 -0
- mirascope/api/_generated/errors/__init__.py +11 -1
- mirascope/api/_generated/errors/conflict_error.py +15 -0
- mirascope/api/_generated/errors/forbidden_error.py +15 -0
- mirascope/api/_generated/errors/internal_server_error.py +15 -0
- mirascope/api/_generated/errors/not_found_error.py +15 -0
- mirascope/api/_generated/organizations/__init__.py +25 -0
- mirascope/api/_generated/organizations/client.py +404 -0
- mirascope/api/_generated/organizations/raw_client.py +902 -0
- mirascope/api/_generated/organizations/types/__init__.py +23 -0
- mirascope/api/_generated/organizations/types/organizations_create_response.py +25 -0
- mirascope/api/_generated/organizations/types/organizations_create_response_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_get_response.py +25 -0
- mirascope/api/_generated/organizations/types/organizations_get_response_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_list_response_item.py +25 -0
- mirascope/api/_generated/organizations/types/organizations_list_response_item_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_response.py +25 -0
- mirascope/api/_generated/organizations/types/organizations_update_response_role.py +7 -0
- mirascope/api/_generated/projects/__init__.py +17 -0
- mirascope/api/_generated/projects/client.py +482 -0
- mirascope/api/_generated/projects/raw_client.py +1058 -0
- mirascope/api/_generated/projects/types/__init__.py +15 -0
- mirascope/api/_generated/projects/types/projects_create_response.py +31 -0
- mirascope/api/_generated/projects/types/projects_get_response.py +31 -0
- mirascope/api/_generated/projects/types/projects_list_response_item.py +31 -0
- mirascope/api/_generated/projects/types/projects_update_response.py +31 -0
- mirascope/api/_generated/reference.md +1311 -0
- mirascope/api/_generated/types/__init__.py +20 -4
- mirascope/api/_generated/types/already_exists_error.py +24 -0
- mirascope/api/_generated/types/already_exists_error_tag.py +5 -0
- mirascope/api/_generated/types/database_error.py +24 -0
- mirascope/api/_generated/types/database_error_tag.py +5 -0
- mirascope/api/_generated/types/http_api_decode_error.py +1 -3
- mirascope/api/_generated/types/issue.py +1 -5
- mirascope/api/_generated/types/not_found_error_body.py +24 -0
- mirascope/api/_generated/types/not_found_error_tag.py +5 -0
- mirascope/api/_generated/types/permission_denied_error.py +24 -0
- mirascope/api/_generated/types/permission_denied_error_tag.py +7 -0
- mirascope/api/_generated/types/property_key.py +2 -2
- mirascope/api/_generated/types/{property_key_tag.py → property_key_key.py} +3 -5
- mirascope/api/_generated/types/{property_key_tag_tag.py → property_key_key_tag.py} +1 -1
- mirascope/llm/__init__.py +6 -2
- mirascope/llm/exceptions.py +28 -0
- mirascope/llm/providers/__init__.py +12 -4
- mirascope/llm/providers/anthropic/__init__.py +6 -1
- mirascope/llm/providers/anthropic/_utils/__init__.py +17 -5
- mirascope/llm/providers/anthropic/_utils/beta_decode.py +271 -0
- mirascope/llm/providers/anthropic/_utils/beta_encode.py +216 -0
- mirascope/llm/providers/anthropic/_utils/decode.py +39 -7
- mirascope/llm/providers/anthropic/_utils/encode.py +156 -64
- mirascope/llm/providers/anthropic/_utils/errors.py +46 -0
- mirascope/llm/providers/anthropic/beta_provider.py +328 -0
- mirascope/llm/providers/anthropic/model_id.py +10 -27
- mirascope/llm/providers/anthropic/model_info.py +87 -0
- mirascope/llm/providers/anthropic/provider.py +132 -145
- mirascope/llm/providers/base/__init__.py +2 -1
- mirascope/llm/providers/base/_utils.py +15 -1
- mirascope/llm/providers/base/base_provider.py +173 -58
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/decode.py +55 -3
- mirascope/llm/providers/google/_utils/encode.py +14 -6
- mirascope/llm/providers/google/_utils/errors.py +49 -0
- mirascope/llm/providers/google/model_id.py +7 -13
- mirascope/llm/providers/google/model_info.py +62 -0
- mirascope/llm/providers/google/provider.py +13 -8
- mirascope/llm/providers/mlx/_utils.py +31 -2
- mirascope/llm/providers/mlx/encoding/transformers.py +17 -1
- mirascope/llm/providers/mlx/provider.py +12 -0
- mirascope/llm/providers/ollama/__init__.py +19 -0
- mirascope/llm/providers/ollama/provider.py +71 -0
- mirascope/llm/providers/openai/__init__.py +10 -1
- mirascope/llm/providers/openai/_utils/__init__.py +5 -0
- mirascope/llm/providers/openai/_utils/errors.py +46 -0
- mirascope/llm/providers/openai/completions/__init__.py +6 -1
- mirascope/llm/providers/openai/completions/_utils/decode.py +57 -5
- mirascope/llm/providers/openai/completions/_utils/encode.py +9 -8
- mirascope/llm/providers/openai/completions/base_provider.py +513 -0
- mirascope/llm/providers/openai/completions/provider.py +13 -447
- mirascope/llm/providers/openai/model_info.py +57 -0
- mirascope/llm/providers/openai/provider.py +30 -5
- mirascope/llm/providers/openai/responses/_utils/decode.py +55 -4
- mirascope/llm/providers/openai/responses/_utils/encode.py +9 -9
- mirascope/llm/providers/openai/responses/provider.py +33 -28
- mirascope/llm/providers/provider_id.py +11 -1
- mirascope/llm/providers/provider_registry.py +59 -4
- mirascope/llm/providers/together/__init__.py +19 -0
- mirascope/llm/providers/together/provider.py +40 -0
- mirascope/llm/responses/__init__.py +3 -0
- mirascope/llm/responses/base_response.py +4 -0
- mirascope/llm/responses/base_stream_response.py +25 -1
- mirascope/llm/responses/finish_reason.py +1 -0
- mirascope/llm/responses/response.py +9 -0
- mirascope/llm/responses/root_response.py +5 -1
- mirascope/llm/responses/usage.py +95 -0
- mirascope/ops/_internal/closure.py +62 -11
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a5.dist-info}/METADATA +3 -3
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a5.dist-info}/RECORD +115 -56
- mirascope/llm/providers/load_provider.py +0 -48
- mirascope/llm/providers/openai/shared/__init__.py +0 -7
- mirascope/llm/providers/openai/shared/_utils.py +0 -59
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a5.dist-info}/WHEEL +0 -0
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a5.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,19 +3,56 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
|
+
AlreadyExistsError,
|
|
7
|
+
AlreadyExistsErrorTag,
|
|
8
|
+
DatabaseError,
|
|
9
|
+
DatabaseErrorTag,
|
|
6
10
|
HttpApiDecodeError,
|
|
7
11
|
HttpApiDecodeErrorTag,
|
|
8
12
|
Issue,
|
|
9
13
|
IssueTag,
|
|
14
|
+
NotFoundErrorBody,
|
|
15
|
+
NotFoundErrorTag,
|
|
16
|
+
PermissionDeniedError,
|
|
17
|
+
PermissionDeniedErrorTag,
|
|
10
18
|
PropertyKey,
|
|
11
|
-
|
|
12
|
-
|
|
19
|
+
PropertyKeyKey,
|
|
20
|
+
PropertyKeyKeyTag,
|
|
13
21
|
)
|
|
14
|
-
from .errors import
|
|
15
|
-
|
|
22
|
+
from .errors import (
|
|
23
|
+
BadRequestError,
|
|
24
|
+
ConflictError,
|
|
25
|
+
ForbiddenError,
|
|
26
|
+
InternalServerError,
|
|
27
|
+
NotFoundError,
|
|
28
|
+
)
|
|
29
|
+
from . import api_keys, docs, environments, health, organizations, projects, traces
|
|
30
|
+
from .api_keys import ApiKeysCreateResponse, ApiKeysGetResponse, ApiKeysListResponseItem
|
|
16
31
|
from .client import AsyncMirascope, Mirascope
|
|
17
32
|
from .environment import MirascopeEnvironment
|
|
33
|
+
from .environments import (
|
|
34
|
+
EnvironmentsCreateResponse,
|
|
35
|
+
EnvironmentsGetResponse,
|
|
36
|
+
EnvironmentsListResponseItem,
|
|
37
|
+
EnvironmentsUpdateResponse,
|
|
38
|
+
)
|
|
18
39
|
from .health import HealthCheckResponse, HealthCheckResponseStatus
|
|
40
|
+
from .organizations import (
|
|
41
|
+
OrganizationsCreateResponse,
|
|
42
|
+
OrganizationsCreateResponseRole,
|
|
43
|
+
OrganizationsGetResponse,
|
|
44
|
+
OrganizationsGetResponseRole,
|
|
45
|
+
OrganizationsListResponseItem,
|
|
46
|
+
OrganizationsListResponseItemRole,
|
|
47
|
+
OrganizationsUpdateResponse,
|
|
48
|
+
OrganizationsUpdateResponseRole,
|
|
49
|
+
)
|
|
50
|
+
from .projects import (
|
|
51
|
+
ProjectsCreateResponse,
|
|
52
|
+
ProjectsGetResponse,
|
|
53
|
+
ProjectsListResponseItem,
|
|
54
|
+
ProjectsUpdateResponse,
|
|
55
|
+
)
|
|
19
56
|
from .traces import (
|
|
20
57
|
TracesCreateRequestResourceSpansItem,
|
|
21
58
|
TracesCreateRequestResourceSpansItemResource,
|
|
@@ -43,19 +80,50 @@ from .traces import (
|
|
|
43
80
|
)
|
|
44
81
|
|
|
45
82
|
__all__ = [
|
|
83
|
+
"AlreadyExistsError",
|
|
84
|
+
"AlreadyExistsErrorTag",
|
|
85
|
+
"ApiKeysCreateResponse",
|
|
86
|
+
"ApiKeysGetResponse",
|
|
87
|
+
"ApiKeysListResponseItem",
|
|
46
88
|
"AsyncMirascope",
|
|
47
89
|
"BadRequestError",
|
|
90
|
+
"ConflictError",
|
|
91
|
+
"DatabaseError",
|
|
92
|
+
"DatabaseErrorTag",
|
|
93
|
+
"EnvironmentsCreateResponse",
|
|
94
|
+
"EnvironmentsGetResponse",
|
|
95
|
+
"EnvironmentsListResponseItem",
|
|
96
|
+
"EnvironmentsUpdateResponse",
|
|
97
|
+
"ForbiddenError",
|
|
48
98
|
"HealthCheckResponse",
|
|
49
99
|
"HealthCheckResponseStatus",
|
|
50
100
|
"HttpApiDecodeError",
|
|
51
101
|
"HttpApiDecodeErrorTag",
|
|
102
|
+
"InternalServerError",
|
|
52
103
|
"Issue",
|
|
53
104
|
"IssueTag",
|
|
54
105
|
"Mirascope",
|
|
55
106
|
"MirascopeEnvironment",
|
|
107
|
+
"NotFoundError",
|
|
108
|
+
"NotFoundErrorBody",
|
|
109
|
+
"NotFoundErrorTag",
|
|
110
|
+
"OrganizationsCreateResponse",
|
|
111
|
+
"OrganizationsCreateResponseRole",
|
|
112
|
+
"OrganizationsGetResponse",
|
|
113
|
+
"OrganizationsGetResponseRole",
|
|
114
|
+
"OrganizationsListResponseItem",
|
|
115
|
+
"OrganizationsListResponseItemRole",
|
|
116
|
+
"OrganizationsUpdateResponse",
|
|
117
|
+
"OrganizationsUpdateResponseRole",
|
|
118
|
+
"PermissionDeniedError",
|
|
119
|
+
"PermissionDeniedErrorTag",
|
|
120
|
+
"ProjectsCreateResponse",
|
|
121
|
+
"ProjectsGetResponse",
|
|
122
|
+
"ProjectsListResponseItem",
|
|
123
|
+
"ProjectsUpdateResponse",
|
|
56
124
|
"PropertyKey",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
125
|
+
"PropertyKeyKey",
|
|
126
|
+
"PropertyKeyKeyTag",
|
|
59
127
|
"TracesCreateRequestResourceSpansItem",
|
|
60
128
|
"TracesCreateRequestResourceSpansItemResource",
|
|
61
129
|
"TracesCreateRequestResourceSpansItemResourceAttributesItem",
|
|
@@ -79,7 +147,11 @@ __all__ = [
|
|
|
79
147
|
"TracesCreateRequestResourceSpansItemScopeSpansItemSpansItemStatus",
|
|
80
148
|
"TracesCreateResponse",
|
|
81
149
|
"TracesCreateResponsePartialSuccess",
|
|
150
|
+
"api_keys",
|
|
82
151
|
"docs",
|
|
152
|
+
"environments",
|
|
83
153
|
"health",
|
|
154
|
+
"organizations",
|
|
155
|
+
"projects",
|
|
84
156
|
"traces",
|
|
85
157
|
]
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawApiKeysClient, RawApiKeysClient
|
|
8
|
+
from .types.api_keys_create_response import ApiKeysCreateResponse
|
|
9
|
+
from .types.api_keys_get_response import ApiKeysGetResponse
|
|
10
|
+
from .types.api_keys_list_response_item import ApiKeysListResponseItem
|
|
11
|
+
|
|
12
|
+
# this is used as the default value for optional parameters
|
|
13
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ApiKeysClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._raw_client = RawApiKeysClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawApiKeysClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawApiKeysClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
30
|
+
|
|
31
|
+
def api_keys_list(
|
|
32
|
+
self,
|
|
33
|
+
organization_id: str,
|
|
34
|
+
project_id: str,
|
|
35
|
+
environment_id: str,
|
|
36
|
+
*,
|
|
37
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
38
|
+
) -> typing.List[ApiKeysListResponseItem]:
|
|
39
|
+
"""
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
organization_id : str
|
|
43
|
+
|
|
44
|
+
project_id : str
|
|
45
|
+
|
|
46
|
+
environment_id : str
|
|
47
|
+
|
|
48
|
+
request_options : typing.Optional[RequestOptions]
|
|
49
|
+
Request-specific configuration.
|
|
50
|
+
|
|
51
|
+
Returns
|
|
52
|
+
-------
|
|
53
|
+
typing.List[ApiKeysListResponseItem]
|
|
54
|
+
Success
|
|
55
|
+
|
|
56
|
+
Examples
|
|
57
|
+
--------
|
|
58
|
+
from mirascope.api._generated import Mirascope
|
|
59
|
+
|
|
60
|
+
client = Mirascope()
|
|
61
|
+
client.api_keys.api_keys_list(
|
|
62
|
+
organization_id="organizationId",
|
|
63
|
+
project_id="projectId",
|
|
64
|
+
environment_id="environmentId",
|
|
65
|
+
)
|
|
66
|
+
"""
|
|
67
|
+
_response = self._raw_client.api_keys_list(
|
|
68
|
+
organization_id, project_id, environment_id, request_options=request_options
|
|
69
|
+
)
|
|
70
|
+
return _response.data
|
|
71
|
+
|
|
72
|
+
def api_keys_create(
|
|
73
|
+
self,
|
|
74
|
+
organization_id: str,
|
|
75
|
+
project_id: str,
|
|
76
|
+
environment_id: str,
|
|
77
|
+
*,
|
|
78
|
+
name: str,
|
|
79
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
80
|
+
) -> ApiKeysCreateResponse:
|
|
81
|
+
"""
|
|
82
|
+
Parameters
|
|
83
|
+
----------
|
|
84
|
+
organization_id : str
|
|
85
|
+
|
|
86
|
+
project_id : str
|
|
87
|
+
|
|
88
|
+
environment_id : str
|
|
89
|
+
|
|
90
|
+
name : str
|
|
91
|
+
a string at most 100 character(s) long
|
|
92
|
+
|
|
93
|
+
request_options : typing.Optional[RequestOptions]
|
|
94
|
+
Request-specific configuration.
|
|
95
|
+
|
|
96
|
+
Returns
|
|
97
|
+
-------
|
|
98
|
+
ApiKeysCreateResponse
|
|
99
|
+
Success
|
|
100
|
+
|
|
101
|
+
Examples
|
|
102
|
+
--------
|
|
103
|
+
from mirascope.api._generated import Mirascope
|
|
104
|
+
|
|
105
|
+
client = Mirascope()
|
|
106
|
+
client.api_keys.api_keys_create(
|
|
107
|
+
organization_id="organizationId",
|
|
108
|
+
project_id="projectId",
|
|
109
|
+
environment_id="environmentId",
|
|
110
|
+
name="name",
|
|
111
|
+
)
|
|
112
|
+
"""
|
|
113
|
+
_response = self._raw_client.api_keys_create(
|
|
114
|
+
organization_id,
|
|
115
|
+
project_id,
|
|
116
|
+
environment_id,
|
|
117
|
+
name=name,
|
|
118
|
+
request_options=request_options,
|
|
119
|
+
)
|
|
120
|
+
return _response.data
|
|
121
|
+
|
|
122
|
+
def api_keys_get(
|
|
123
|
+
self,
|
|
124
|
+
organization_id: str,
|
|
125
|
+
project_id: str,
|
|
126
|
+
environment_id: str,
|
|
127
|
+
api_key_id: str,
|
|
128
|
+
*,
|
|
129
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
130
|
+
) -> ApiKeysGetResponse:
|
|
131
|
+
"""
|
|
132
|
+
Parameters
|
|
133
|
+
----------
|
|
134
|
+
organization_id : str
|
|
135
|
+
|
|
136
|
+
project_id : str
|
|
137
|
+
|
|
138
|
+
environment_id : str
|
|
139
|
+
|
|
140
|
+
api_key_id : str
|
|
141
|
+
|
|
142
|
+
request_options : typing.Optional[RequestOptions]
|
|
143
|
+
Request-specific configuration.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
ApiKeysGetResponse
|
|
148
|
+
Success
|
|
149
|
+
|
|
150
|
+
Examples
|
|
151
|
+
--------
|
|
152
|
+
from mirascope.api._generated import Mirascope
|
|
153
|
+
|
|
154
|
+
client = Mirascope()
|
|
155
|
+
client.api_keys.api_keys_get(
|
|
156
|
+
organization_id="organizationId",
|
|
157
|
+
project_id="projectId",
|
|
158
|
+
environment_id="environmentId",
|
|
159
|
+
api_key_id="apiKeyId",
|
|
160
|
+
)
|
|
161
|
+
"""
|
|
162
|
+
_response = self._raw_client.api_keys_get(
|
|
163
|
+
organization_id,
|
|
164
|
+
project_id,
|
|
165
|
+
environment_id,
|
|
166
|
+
api_key_id,
|
|
167
|
+
request_options=request_options,
|
|
168
|
+
)
|
|
169
|
+
return _response.data
|
|
170
|
+
|
|
171
|
+
def api_keys_delete(
|
|
172
|
+
self,
|
|
173
|
+
organization_id: str,
|
|
174
|
+
project_id: str,
|
|
175
|
+
environment_id: str,
|
|
176
|
+
api_key_id: str,
|
|
177
|
+
*,
|
|
178
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
179
|
+
) -> None:
|
|
180
|
+
"""
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
organization_id : str
|
|
184
|
+
|
|
185
|
+
project_id : str
|
|
186
|
+
|
|
187
|
+
environment_id : str
|
|
188
|
+
|
|
189
|
+
api_key_id : str
|
|
190
|
+
|
|
191
|
+
request_options : typing.Optional[RequestOptions]
|
|
192
|
+
Request-specific configuration.
|
|
193
|
+
|
|
194
|
+
Returns
|
|
195
|
+
-------
|
|
196
|
+
None
|
|
197
|
+
|
|
198
|
+
Examples
|
|
199
|
+
--------
|
|
200
|
+
from mirascope.api._generated import Mirascope
|
|
201
|
+
|
|
202
|
+
client = Mirascope()
|
|
203
|
+
client.api_keys.api_keys_delete(
|
|
204
|
+
organization_id="organizationId",
|
|
205
|
+
project_id="projectId",
|
|
206
|
+
environment_id="environmentId",
|
|
207
|
+
api_key_id="apiKeyId",
|
|
208
|
+
)
|
|
209
|
+
"""
|
|
210
|
+
_response = self._raw_client.api_keys_delete(
|
|
211
|
+
organization_id,
|
|
212
|
+
project_id,
|
|
213
|
+
environment_id,
|
|
214
|
+
api_key_id,
|
|
215
|
+
request_options=request_options,
|
|
216
|
+
)
|
|
217
|
+
return _response.data
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class AsyncApiKeysClient:
|
|
221
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
222
|
+
self._raw_client = AsyncRawApiKeysClient(client_wrapper=client_wrapper)
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def with_raw_response(self) -> AsyncRawApiKeysClient:
|
|
226
|
+
"""
|
|
227
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
AsyncRawApiKeysClient
|
|
232
|
+
"""
|
|
233
|
+
return self._raw_client
|
|
234
|
+
|
|
235
|
+
async def api_keys_list(
|
|
236
|
+
self,
|
|
237
|
+
organization_id: str,
|
|
238
|
+
project_id: str,
|
|
239
|
+
environment_id: str,
|
|
240
|
+
*,
|
|
241
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
242
|
+
) -> typing.List[ApiKeysListResponseItem]:
|
|
243
|
+
"""
|
|
244
|
+
Parameters
|
|
245
|
+
----------
|
|
246
|
+
organization_id : str
|
|
247
|
+
|
|
248
|
+
project_id : str
|
|
249
|
+
|
|
250
|
+
environment_id : str
|
|
251
|
+
|
|
252
|
+
request_options : typing.Optional[RequestOptions]
|
|
253
|
+
Request-specific configuration.
|
|
254
|
+
|
|
255
|
+
Returns
|
|
256
|
+
-------
|
|
257
|
+
typing.List[ApiKeysListResponseItem]
|
|
258
|
+
Success
|
|
259
|
+
|
|
260
|
+
Examples
|
|
261
|
+
--------
|
|
262
|
+
import asyncio
|
|
263
|
+
|
|
264
|
+
from mirascope.api._generated import AsyncMirascope
|
|
265
|
+
|
|
266
|
+
client = AsyncMirascope()
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
async def main() -> None:
|
|
270
|
+
await client.api_keys.api_keys_list(
|
|
271
|
+
organization_id="organizationId",
|
|
272
|
+
project_id="projectId",
|
|
273
|
+
environment_id="environmentId",
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
asyncio.run(main())
|
|
278
|
+
"""
|
|
279
|
+
_response = await self._raw_client.api_keys_list(
|
|
280
|
+
organization_id, project_id, environment_id, request_options=request_options
|
|
281
|
+
)
|
|
282
|
+
return _response.data
|
|
283
|
+
|
|
284
|
+
async def api_keys_create(
|
|
285
|
+
self,
|
|
286
|
+
organization_id: str,
|
|
287
|
+
project_id: str,
|
|
288
|
+
environment_id: str,
|
|
289
|
+
*,
|
|
290
|
+
name: str,
|
|
291
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
292
|
+
) -> ApiKeysCreateResponse:
|
|
293
|
+
"""
|
|
294
|
+
Parameters
|
|
295
|
+
----------
|
|
296
|
+
organization_id : str
|
|
297
|
+
|
|
298
|
+
project_id : str
|
|
299
|
+
|
|
300
|
+
environment_id : str
|
|
301
|
+
|
|
302
|
+
name : str
|
|
303
|
+
a string at most 100 character(s) long
|
|
304
|
+
|
|
305
|
+
request_options : typing.Optional[RequestOptions]
|
|
306
|
+
Request-specific configuration.
|
|
307
|
+
|
|
308
|
+
Returns
|
|
309
|
+
-------
|
|
310
|
+
ApiKeysCreateResponse
|
|
311
|
+
Success
|
|
312
|
+
|
|
313
|
+
Examples
|
|
314
|
+
--------
|
|
315
|
+
import asyncio
|
|
316
|
+
|
|
317
|
+
from mirascope.api._generated import AsyncMirascope
|
|
318
|
+
|
|
319
|
+
client = AsyncMirascope()
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
async def main() -> None:
|
|
323
|
+
await client.api_keys.api_keys_create(
|
|
324
|
+
organization_id="organizationId",
|
|
325
|
+
project_id="projectId",
|
|
326
|
+
environment_id="environmentId",
|
|
327
|
+
name="name",
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
asyncio.run(main())
|
|
332
|
+
"""
|
|
333
|
+
_response = await self._raw_client.api_keys_create(
|
|
334
|
+
organization_id,
|
|
335
|
+
project_id,
|
|
336
|
+
environment_id,
|
|
337
|
+
name=name,
|
|
338
|
+
request_options=request_options,
|
|
339
|
+
)
|
|
340
|
+
return _response.data
|
|
341
|
+
|
|
342
|
+
async def api_keys_get(
|
|
343
|
+
self,
|
|
344
|
+
organization_id: str,
|
|
345
|
+
project_id: str,
|
|
346
|
+
environment_id: str,
|
|
347
|
+
api_key_id: str,
|
|
348
|
+
*,
|
|
349
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
350
|
+
) -> ApiKeysGetResponse:
|
|
351
|
+
"""
|
|
352
|
+
Parameters
|
|
353
|
+
----------
|
|
354
|
+
organization_id : str
|
|
355
|
+
|
|
356
|
+
project_id : str
|
|
357
|
+
|
|
358
|
+
environment_id : str
|
|
359
|
+
|
|
360
|
+
api_key_id : str
|
|
361
|
+
|
|
362
|
+
request_options : typing.Optional[RequestOptions]
|
|
363
|
+
Request-specific configuration.
|
|
364
|
+
|
|
365
|
+
Returns
|
|
366
|
+
-------
|
|
367
|
+
ApiKeysGetResponse
|
|
368
|
+
Success
|
|
369
|
+
|
|
370
|
+
Examples
|
|
371
|
+
--------
|
|
372
|
+
import asyncio
|
|
373
|
+
|
|
374
|
+
from mirascope.api._generated import AsyncMirascope
|
|
375
|
+
|
|
376
|
+
client = AsyncMirascope()
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
async def main() -> None:
|
|
380
|
+
await client.api_keys.api_keys_get(
|
|
381
|
+
organization_id="organizationId",
|
|
382
|
+
project_id="projectId",
|
|
383
|
+
environment_id="environmentId",
|
|
384
|
+
api_key_id="apiKeyId",
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
asyncio.run(main())
|
|
389
|
+
"""
|
|
390
|
+
_response = await self._raw_client.api_keys_get(
|
|
391
|
+
organization_id,
|
|
392
|
+
project_id,
|
|
393
|
+
environment_id,
|
|
394
|
+
api_key_id,
|
|
395
|
+
request_options=request_options,
|
|
396
|
+
)
|
|
397
|
+
return _response.data
|
|
398
|
+
|
|
399
|
+
async def api_keys_delete(
|
|
400
|
+
self,
|
|
401
|
+
organization_id: str,
|
|
402
|
+
project_id: str,
|
|
403
|
+
environment_id: str,
|
|
404
|
+
api_key_id: str,
|
|
405
|
+
*,
|
|
406
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
407
|
+
) -> None:
|
|
408
|
+
"""
|
|
409
|
+
Parameters
|
|
410
|
+
----------
|
|
411
|
+
organization_id : str
|
|
412
|
+
|
|
413
|
+
project_id : str
|
|
414
|
+
|
|
415
|
+
environment_id : str
|
|
416
|
+
|
|
417
|
+
api_key_id : str
|
|
418
|
+
|
|
419
|
+
request_options : typing.Optional[RequestOptions]
|
|
420
|
+
Request-specific configuration.
|
|
421
|
+
|
|
422
|
+
Returns
|
|
423
|
+
-------
|
|
424
|
+
None
|
|
425
|
+
|
|
426
|
+
Examples
|
|
427
|
+
--------
|
|
428
|
+
import asyncio
|
|
429
|
+
|
|
430
|
+
from mirascope.api._generated import AsyncMirascope
|
|
431
|
+
|
|
432
|
+
client = AsyncMirascope()
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
async def main() -> None:
|
|
436
|
+
await client.api_keys.api_keys_delete(
|
|
437
|
+
organization_id="organizationId",
|
|
438
|
+
project_id="projectId",
|
|
439
|
+
environment_id="environmentId",
|
|
440
|
+
api_key_id="apiKeyId",
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
asyncio.run(main())
|
|
445
|
+
"""
|
|
446
|
+
_response = await self._raw_client.api_keys_delete(
|
|
447
|
+
organization_id,
|
|
448
|
+
project_id,
|
|
449
|
+
environment_id,
|
|
450
|
+
api_key_id,
|
|
451
|
+
request_options=request_options,
|
|
452
|
+
)
|
|
453
|
+
return _response.data
|