mirascope 2.0.0a3__py3-none-any.whl → 2.0.0a4__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 +62 -6
- mirascope/api/_generated/client.py +8 -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 +380 -0
- mirascope/api/_generated/organizations/raw_client.py +876 -0
- mirascope/api/_generated/organizations/types/__init__.py +23 -0
- mirascope/api/_generated/organizations/types/organizations_create_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_create_response_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_get_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_get_response_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_list_response_item.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_list_response_item_role.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_response.py +24 -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 +458 -0
- mirascope/api/_generated/projects/raw_client.py +1016 -0
- mirascope/api/_generated/projects/types/__init__.py +15 -0
- mirascope/api/_generated/projects/types/projects_create_response.py +30 -0
- mirascope/api/_generated/projects/types/projects_get_response.py +30 -0
- mirascope/api/_generated/projects/types/projects_list_response_item.py +30 -0
- mirascope/api/_generated/projects/types/projects_update_response.py +30 -0
- mirascope/api/_generated/reference.md +586 -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 +4 -0
- mirascope/llm/providers/__init__.py +6 -0
- mirascope/llm/providers/anthropic/__init__.py +6 -1
- mirascope/llm/providers/anthropic/_utils/__init__.py +15 -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/beta_provider.py +322 -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 +127 -145
- mirascope/llm/providers/base/_utils.py +15 -1
- mirascope/llm/providers/google/_utils/decode.py +55 -3
- mirascope/llm/providers/google/_utils/encode.py +14 -6
- mirascope/llm/providers/google/model_id.py +7 -13
- mirascope/llm/providers/google/model_info.py +62 -0
- mirascope/llm/providers/google/provider.py +8 -4
- mirascope/llm/providers/load_provider.py +8 -2
- mirascope/llm/providers/mlx/_utils.py +23 -1
- mirascope/llm/providers/mlx/encoding/transformers.py +17 -1
- mirascope/llm/providers/mlx/provider.py +4 -0
- mirascope/llm/providers/ollama/__init__.py +19 -0
- mirascope/llm/providers/ollama/provider.py +71 -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 +16 -4
- 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 +20 -21
- mirascope/llm/providers/provider_id.py +11 -1
- mirascope/llm/providers/provider_registry.py +3 -1
- 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-2.0.0a3.dist-info → mirascope-2.0.0a4.dist-info}/METADATA +3 -3
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a4.dist-info}/RECORD +91 -50
- 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.0a4.dist-info}/WHEEL +0 -0
- {mirascope-2.0.0a3.dist-info → mirascope-2.0.0a4.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,19 +3,49 @@
|
|
|
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 docs, health, organizations, projects, traces
|
|
16
30
|
from .client import AsyncMirascope, Mirascope
|
|
17
31
|
from .environment import MirascopeEnvironment
|
|
18
32
|
from .health import HealthCheckResponse, HealthCheckResponseStatus
|
|
33
|
+
from .organizations import (
|
|
34
|
+
OrganizationsCreateResponse,
|
|
35
|
+
OrganizationsCreateResponseRole,
|
|
36
|
+
OrganizationsGetResponse,
|
|
37
|
+
OrganizationsGetResponseRole,
|
|
38
|
+
OrganizationsListResponseItem,
|
|
39
|
+
OrganizationsListResponseItemRole,
|
|
40
|
+
OrganizationsUpdateResponse,
|
|
41
|
+
OrganizationsUpdateResponseRole,
|
|
42
|
+
)
|
|
43
|
+
from .projects import (
|
|
44
|
+
ProjectsCreateResponse,
|
|
45
|
+
ProjectsGetResponse,
|
|
46
|
+
ProjectsListResponseItem,
|
|
47
|
+
ProjectsUpdateResponse,
|
|
48
|
+
)
|
|
19
49
|
from .traces import (
|
|
20
50
|
TracesCreateRequestResourceSpansItem,
|
|
21
51
|
TracesCreateRequestResourceSpansItemResource,
|
|
@@ -43,19 +73,43 @@ from .traces import (
|
|
|
43
73
|
)
|
|
44
74
|
|
|
45
75
|
__all__ = [
|
|
76
|
+
"AlreadyExistsError",
|
|
77
|
+
"AlreadyExistsErrorTag",
|
|
46
78
|
"AsyncMirascope",
|
|
47
79
|
"BadRequestError",
|
|
80
|
+
"ConflictError",
|
|
81
|
+
"DatabaseError",
|
|
82
|
+
"DatabaseErrorTag",
|
|
83
|
+
"ForbiddenError",
|
|
48
84
|
"HealthCheckResponse",
|
|
49
85
|
"HealthCheckResponseStatus",
|
|
50
86
|
"HttpApiDecodeError",
|
|
51
87
|
"HttpApiDecodeErrorTag",
|
|
88
|
+
"InternalServerError",
|
|
52
89
|
"Issue",
|
|
53
90
|
"IssueTag",
|
|
54
91
|
"Mirascope",
|
|
55
92
|
"MirascopeEnvironment",
|
|
93
|
+
"NotFoundError",
|
|
94
|
+
"NotFoundErrorBody",
|
|
95
|
+
"NotFoundErrorTag",
|
|
96
|
+
"OrganizationsCreateResponse",
|
|
97
|
+
"OrganizationsCreateResponseRole",
|
|
98
|
+
"OrganizationsGetResponse",
|
|
99
|
+
"OrganizationsGetResponseRole",
|
|
100
|
+
"OrganizationsListResponseItem",
|
|
101
|
+
"OrganizationsListResponseItemRole",
|
|
102
|
+
"OrganizationsUpdateResponse",
|
|
103
|
+
"OrganizationsUpdateResponseRole",
|
|
104
|
+
"PermissionDeniedError",
|
|
105
|
+
"PermissionDeniedErrorTag",
|
|
106
|
+
"ProjectsCreateResponse",
|
|
107
|
+
"ProjectsGetResponse",
|
|
108
|
+
"ProjectsListResponseItem",
|
|
109
|
+
"ProjectsUpdateResponse",
|
|
56
110
|
"PropertyKey",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
111
|
+
"PropertyKeyKey",
|
|
112
|
+
"PropertyKeyKeyTag",
|
|
59
113
|
"TracesCreateRequestResourceSpansItem",
|
|
60
114
|
"TracesCreateRequestResourceSpansItemResource",
|
|
61
115
|
"TracesCreateRequestResourceSpansItemResourceAttributesItem",
|
|
@@ -81,5 +135,7 @@ __all__ = [
|
|
|
81
135
|
"TracesCreateResponsePartialSuccess",
|
|
82
136
|
"docs",
|
|
83
137
|
"health",
|
|
138
|
+
"organizations",
|
|
139
|
+
"projects",
|
|
84
140
|
"traces",
|
|
85
141
|
]
|
|
@@ -7,6 +7,8 @@ from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
|
7
7
|
from .docs.client import AsyncDocsClient, DocsClient
|
|
8
8
|
from .environment import MirascopeEnvironment
|
|
9
9
|
from .health.client import AsyncHealthClient, HealthClient
|
|
10
|
+
from .organizations.client import AsyncOrganizationsClient, OrganizationsClient
|
|
11
|
+
from .projects.client import AsyncProjectsClient, ProjectsClient
|
|
10
12
|
from .traces.client import AsyncTracesClient, TracesClient
|
|
11
13
|
|
|
12
14
|
|
|
@@ -74,6 +76,8 @@ class Mirascope:
|
|
|
74
76
|
self.health = HealthClient(client_wrapper=self._client_wrapper)
|
|
75
77
|
self.traces = TracesClient(client_wrapper=self._client_wrapper)
|
|
76
78
|
self.docs = DocsClient(client_wrapper=self._client_wrapper)
|
|
79
|
+
self.organizations = OrganizationsClient(client_wrapper=self._client_wrapper)
|
|
80
|
+
self.projects = ProjectsClient(client_wrapper=self._client_wrapper)
|
|
77
81
|
|
|
78
82
|
|
|
79
83
|
class AsyncMirascope:
|
|
@@ -140,6 +144,10 @@ class AsyncMirascope:
|
|
|
140
144
|
self.health = AsyncHealthClient(client_wrapper=self._client_wrapper)
|
|
141
145
|
self.traces = AsyncTracesClient(client_wrapper=self._client_wrapper)
|
|
142
146
|
self.docs = AsyncDocsClient(client_wrapper=self._client_wrapper)
|
|
147
|
+
self.organizations = AsyncOrganizationsClient(
|
|
148
|
+
client_wrapper=self._client_wrapper
|
|
149
|
+
)
|
|
150
|
+
self.projects = AsyncProjectsClient(client_wrapper=self._client_wrapper)
|
|
143
151
|
|
|
144
152
|
|
|
145
153
|
def _get_base_url(
|
|
@@ -3,5 +3,15 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .bad_request_error import BadRequestError
|
|
6
|
+
from .conflict_error import ConflictError
|
|
7
|
+
from .forbidden_error import ForbiddenError
|
|
8
|
+
from .internal_server_error import InternalServerError
|
|
9
|
+
from .not_found_error import NotFoundError
|
|
6
10
|
|
|
7
|
-
__all__ = [
|
|
11
|
+
__all__ = [
|
|
12
|
+
"BadRequestError",
|
|
13
|
+
"ConflictError",
|
|
14
|
+
"ForbiddenError",
|
|
15
|
+
"InternalServerError",
|
|
16
|
+
"NotFoundError",
|
|
17
|
+
]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.already_exists_error import AlreadyExistsError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ConflictError(ApiError):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
body: AlreadyExistsError,
|
|
13
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
14
|
+
):
|
|
15
|
+
super().__init__(status_code=409, headers=headers, body=body)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.permission_denied_error import PermissionDeniedError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ForbiddenError(ApiError):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
body: PermissionDeniedError,
|
|
13
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
14
|
+
):
|
|
15
|
+
super().__init__(status_code=403, headers=headers, body=body)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.database_error import DatabaseError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class InternalServerError(ApiError):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
body: DatabaseError,
|
|
13
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
14
|
+
):
|
|
15
|
+
super().__init__(status_code=500, headers=headers, body=body)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.not_found_error_body import NotFoundErrorBody
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NotFoundError(ApiError):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
body: NotFoundErrorBody,
|
|
13
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
14
|
+
):
|
|
15
|
+
super().__init__(status_code=404, headers=headers, body=body)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .types import (
|
|
6
|
+
OrganizationsCreateResponse,
|
|
7
|
+
OrganizationsCreateResponseRole,
|
|
8
|
+
OrganizationsGetResponse,
|
|
9
|
+
OrganizationsGetResponseRole,
|
|
10
|
+
OrganizationsListResponseItem,
|
|
11
|
+
OrganizationsListResponseItemRole,
|
|
12
|
+
OrganizationsUpdateResponse,
|
|
13
|
+
OrganizationsUpdateResponseRole,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"OrganizationsCreateResponse",
|
|
18
|
+
"OrganizationsCreateResponseRole",
|
|
19
|
+
"OrganizationsGetResponse",
|
|
20
|
+
"OrganizationsGetResponseRole",
|
|
21
|
+
"OrganizationsListResponseItem",
|
|
22
|
+
"OrganizationsListResponseItemRole",
|
|
23
|
+
"OrganizationsUpdateResponse",
|
|
24
|
+
"OrganizationsUpdateResponseRole",
|
|
25
|
+
]
|
|
@@ -0,0 +1,380 @@
|
|
|
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 AsyncRawOrganizationsClient, RawOrganizationsClient
|
|
8
|
+
from .types.organizations_create_response import OrganizationsCreateResponse
|
|
9
|
+
from .types.organizations_get_response import OrganizationsGetResponse
|
|
10
|
+
from .types.organizations_list_response_item import OrganizationsListResponseItem
|
|
11
|
+
from .types.organizations_update_response import OrganizationsUpdateResponse
|
|
12
|
+
|
|
13
|
+
# this is used as the default value for optional parameters
|
|
14
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class OrganizationsClient:
|
|
18
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
19
|
+
self._raw_client = RawOrganizationsClient(client_wrapper=client_wrapper)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def with_raw_response(self) -> RawOrganizationsClient:
|
|
23
|
+
"""
|
|
24
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
25
|
+
|
|
26
|
+
Returns
|
|
27
|
+
-------
|
|
28
|
+
RawOrganizationsClient
|
|
29
|
+
"""
|
|
30
|
+
return self._raw_client
|
|
31
|
+
|
|
32
|
+
def list(
|
|
33
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
34
|
+
) -> typing.List[OrganizationsListResponseItem]:
|
|
35
|
+
"""
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
request_options : typing.Optional[RequestOptions]
|
|
39
|
+
Request-specific configuration.
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
typing.List[OrganizationsListResponseItem]
|
|
44
|
+
Success
|
|
45
|
+
|
|
46
|
+
Examples
|
|
47
|
+
--------
|
|
48
|
+
from mirascope.api._generated import Mirascope
|
|
49
|
+
|
|
50
|
+
client = Mirascope()
|
|
51
|
+
client.organizations.list()
|
|
52
|
+
"""
|
|
53
|
+
_response = self._raw_client.list(request_options=request_options)
|
|
54
|
+
return _response.data
|
|
55
|
+
|
|
56
|
+
def create(
|
|
57
|
+
self, *, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
58
|
+
) -> OrganizationsCreateResponse:
|
|
59
|
+
"""
|
|
60
|
+
Parameters
|
|
61
|
+
----------
|
|
62
|
+
name : str
|
|
63
|
+
a string at most 100 character(s) long
|
|
64
|
+
|
|
65
|
+
request_options : typing.Optional[RequestOptions]
|
|
66
|
+
Request-specific configuration.
|
|
67
|
+
|
|
68
|
+
Returns
|
|
69
|
+
-------
|
|
70
|
+
OrganizationsCreateResponse
|
|
71
|
+
Success
|
|
72
|
+
|
|
73
|
+
Examples
|
|
74
|
+
--------
|
|
75
|
+
from mirascope.api._generated import Mirascope
|
|
76
|
+
|
|
77
|
+
client = Mirascope()
|
|
78
|
+
client.organizations.create(
|
|
79
|
+
name="name",
|
|
80
|
+
)
|
|
81
|
+
"""
|
|
82
|
+
_response = self._raw_client.create(name=name, request_options=request_options)
|
|
83
|
+
return _response.data
|
|
84
|
+
|
|
85
|
+
def get(
|
|
86
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
87
|
+
) -> OrganizationsGetResponse:
|
|
88
|
+
"""
|
|
89
|
+
Parameters
|
|
90
|
+
----------
|
|
91
|
+
id : str
|
|
92
|
+
|
|
93
|
+
request_options : typing.Optional[RequestOptions]
|
|
94
|
+
Request-specific configuration.
|
|
95
|
+
|
|
96
|
+
Returns
|
|
97
|
+
-------
|
|
98
|
+
OrganizationsGetResponse
|
|
99
|
+
Success
|
|
100
|
+
|
|
101
|
+
Examples
|
|
102
|
+
--------
|
|
103
|
+
from mirascope.api._generated import Mirascope
|
|
104
|
+
|
|
105
|
+
client = Mirascope()
|
|
106
|
+
client.organizations.get(
|
|
107
|
+
id="id",
|
|
108
|
+
)
|
|
109
|
+
"""
|
|
110
|
+
_response = self._raw_client.get(id, request_options=request_options)
|
|
111
|
+
return _response.data
|
|
112
|
+
|
|
113
|
+
def update(
|
|
114
|
+
self,
|
|
115
|
+
id: str,
|
|
116
|
+
*,
|
|
117
|
+
name: str,
|
|
118
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
119
|
+
) -> OrganizationsUpdateResponse:
|
|
120
|
+
"""
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
id : str
|
|
124
|
+
|
|
125
|
+
name : str
|
|
126
|
+
a string at most 100 character(s) long
|
|
127
|
+
|
|
128
|
+
request_options : typing.Optional[RequestOptions]
|
|
129
|
+
Request-specific configuration.
|
|
130
|
+
|
|
131
|
+
Returns
|
|
132
|
+
-------
|
|
133
|
+
OrganizationsUpdateResponse
|
|
134
|
+
Success
|
|
135
|
+
|
|
136
|
+
Examples
|
|
137
|
+
--------
|
|
138
|
+
from mirascope.api._generated import Mirascope
|
|
139
|
+
|
|
140
|
+
client = Mirascope()
|
|
141
|
+
client.organizations.update(
|
|
142
|
+
id="id",
|
|
143
|
+
name="name",
|
|
144
|
+
)
|
|
145
|
+
"""
|
|
146
|
+
_response = self._raw_client.update(
|
|
147
|
+
id, name=name, request_options=request_options
|
|
148
|
+
)
|
|
149
|
+
return _response.data
|
|
150
|
+
|
|
151
|
+
def delete(
|
|
152
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
153
|
+
) -> None:
|
|
154
|
+
"""
|
|
155
|
+
Parameters
|
|
156
|
+
----------
|
|
157
|
+
id : str
|
|
158
|
+
|
|
159
|
+
request_options : typing.Optional[RequestOptions]
|
|
160
|
+
Request-specific configuration.
|
|
161
|
+
|
|
162
|
+
Returns
|
|
163
|
+
-------
|
|
164
|
+
None
|
|
165
|
+
|
|
166
|
+
Examples
|
|
167
|
+
--------
|
|
168
|
+
from mirascope.api._generated import Mirascope
|
|
169
|
+
|
|
170
|
+
client = Mirascope()
|
|
171
|
+
client.organizations.delete(
|
|
172
|
+
id="id",
|
|
173
|
+
)
|
|
174
|
+
"""
|
|
175
|
+
_response = self._raw_client.delete(id, request_options=request_options)
|
|
176
|
+
return _response.data
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class AsyncOrganizationsClient:
|
|
180
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
181
|
+
self._raw_client = AsyncRawOrganizationsClient(client_wrapper=client_wrapper)
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def with_raw_response(self) -> AsyncRawOrganizationsClient:
|
|
185
|
+
"""
|
|
186
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
187
|
+
|
|
188
|
+
Returns
|
|
189
|
+
-------
|
|
190
|
+
AsyncRawOrganizationsClient
|
|
191
|
+
"""
|
|
192
|
+
return self._raw_client
|
|
193
|
+
|
|
194
|
+
async def list(
|
|
195
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
196
|
+
) -> typing.List[OrganizationsListResponseItem]:
|
|
197
|
+
"""
|
|
198
|
+
Parameters
|
|
199
|
+
----------
|
|
200
|
+
request_options : typing.Optional[RequestOptions]
|
|
201
|
+
Request-specific configuration.
|
|
202
|
+
|
|
203
|
+
Returns
|
|
204
|
+
-------
|
|
205
|
+
typing.List[OrganizationsListResponseItem]
|
|
206
|
+
Success
|
|
207
|
+
|
|
208
|
+
Examples
|
|
209
|
+
--------
|
|
210
|
+
import asyncio
|
|
211
|
+
|
|
212
|
+
from mirascope.api._generated import AsyncMirascope
|
|
213
|
+
|
|
214
|
+
client = AsyncMirascope()
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
async def main() -> None:
|
|
218
|
+
await client.organizations.list()
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
asyncio.run(main())
|
|
222
|
+
"""
|
|
223
|
+
_response = await self._raw_client.list(request_options=request_options)
|
|
224
|
+
return _response.data
|
|
225
|
+
|
|
226
|
+
async def create(
|
|
227
|
+
self, *, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
228
|
+
) -> OrganizationsCreateResponse:
|
|
229
|
+
"""
|
|
230
|
+
Parameters
|
|
231
|
+
----------
|
|
232
|
+
name : str
|
|
233
|
+
a string at most 100 character(s) long
|
|
234
|
+
|
|
235
|
+
request_options : typing.Optional[RequestOptions]
|
|
236
|
+
Request-specific configuration.
|
|
237
|
+
|
|
238
|
+
Returns
|
|
239
|
+
-------
|
|
240
|
+
OrganizationsCreateResponse
|
|
241
|
+
Success
|
|
242
|
+
|
|
243
|
+
Examples
|
|
244
|
+
--------
|
|
245
|
+
import asyncio
|
|
246
|
+
|
|
247
|
+
from mirascope.api._generated import AsyncMirascope
|
|
248
|
+
|
|
249
|
+
client = AsyncMirascope()
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
async def main() -> None:
|
|
253
|
+
await client.organizations.create(
|
|
254
|
+
name="name",
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
asyncio.run(main())
|
|
259
|
+
"""
|
|
260
|
+
_response = await self._raw_client.create(
|
|
261
|
+
name=name, request_options=request_options
|
|
262
|
+
)
|
|
263
|
+
return _response.data
|
|
264
|
+
|
|
265
|
+
async def get(
|
|
266
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
267
|
+
) -> OrganizationsGetResponse:
|
|
268
|
+
"""
|
|
269
|
+
Parameters
|
|
270
|
+
----------
|
|
271
|
+
id : str
|
|
272
|
+
|
|
273
|
+
request_options : typing.Optional[RequestOptions]
|
|
274
|
+
Request-specific configuration.
|
|
275
|
+
|
|
276
|
+
Returns
|
|
277
|
+
-------
|
|
278
|
+
OrganizationsGetResponse
|
|
279
|
+
Success
|
|
280
|
+
|
|
281
|
+
Examples
|
|
282
|
+
--------
|
|
283
|
+
import asyncio
|
|
284
|
+
|
|
285
|
+
from mirascope.api._generated import AsyncMirascope
|
|
286
|
+
|
|
287
|
+
client = AsyncMirascope()
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
async def main() -> None:
|
|
291
|
+
await client.organizations.get(
|
|
292
|
+
id="id",
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
asyncio.run(main())
|
|
297
|
+
"""
|
|
298
|
+
_response = await self._raw_client.get(id, request_options=request_options)
|
|
299
|
+
return _response.data
|
|
300
|
+
|
|
301
|
+
async def update(
|
|
302
|
+
self,
|
|
303
|
+
id: str,
|
|
304
|
+
*,
|
|
305
|
+
name: str,
|
|
306
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
307
|
+
) -> OrganizationsUpdateResponse:
|
|
308
|
+
"""
|
|
309
|
+
Parameters
|
|
310
|
+
----------
|
|
311
|
+
id : str
|
|
312
|
+
|
|
313
|
+
name : str
|
|
314
|
+
a string at most 100 character(s) long
|
|
315
|
+
|
|
316
|
+
request_options : typing.Optional[RequestOptions]
|
|
317
|
+
Request-specific configuration.
|
|
318
|
+
|
|
319
|
+
Returns
|
|
320
|
+
-------
|
|
321
|
+
OrganizationsUpdateResponse
|
|
322
|
+
Success
|
|
323
|
+
|
|
324
|
+
Examples
|
|
325
|
+
--------
|
|
326
|
+
import asyncio
|
|
327
|
+
|
|
328
|
+
from mirascope.api._generated import AsyncMirascope
|
|
329
|
+
|
|
330
|
+
client = AsyncMirascope()
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
async def main() -> None:
|
|
334
|
+
await client.organizations.update(
|
|
335
|
+
id="id",
|
|
336
|
+
name="name",
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
asyncio.run(main())
|
|
341
|
+
"""
|
|
342
|
+
_response = await self._raw_client.update(
|
|
343
|
+
id, name=name, request_options=request_options
|
|
344
|
+
)
|
|
345
|
+
return _response.data
|
|
346
|
+
|
|
347
|
+
async def delete(
|
|
348
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
349
|
+
) -> None:
|
|
350
|
+
"""
|
|
351
|
+
Parameters
|
|
352
|
+
----------
|
|
353
|
+
id : str
|
|
354
|
+
|
|
355
|
+
request_options : typing.Optional[RequestOptions]
|
|
356
|
+
Request-specific configuration.
|
|
357
|
+
|
|
358
|
+
Returns
|
|
359
|
+
-------
|
|
360
|
+
None
|
|
361
|
+
|
|
362
|
+
Examples
|
|
363
|
+
--------
|
|
364
|
+
import asyncio
|
|
365
|
+
|
|
366
|
+
from mirascope.api._generated import AsyncMirascope
|
|
367
|
+
|
|
368
|
+
client = AsyncMirascope()
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
async def main() -> None:
|
|
372
|
+
await client.organizations.delete(
|
|
373
|
+
id="id",
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
asyncio.run(main())
|
|
378
|
+
"""
|
|
379
|
+
_response = await self._raw_client.delete(id, request_options=request_options)
|
|
380
|
+
return _response.data
|