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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .organizations_create_response import OrganizationsCreateResponse
|
|
6
|
+
from .organizations_create_response_role import OrganizationsCreateResponseRole
|
|
7
|
+
from .organizations_get_response import OrganizationsGetResponse
|
|
8
|
+
from .organizations_get_response_role import OrganizationsGetResponseRole
|
|
9
|
+
from .organizations_list_response_item import OrganizationsListResponseItem
|
|
10
|
+
from .organizations_list_response_item_role import OrganizationsListResponseItemRole
|
|
11
|
+
from .organizations_update_response import OrganizationsUpdateResponse
|
|
12
|
+
from .organizations_update_response_role import OrganizationsUpdateResponseRole
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"OrganizationsCreateResponse",
|
|
16
|
+
"OrganizationsCreateResponseRole",
|
|
17
|
+
"OrganizationsGetResponse",
|
|
18
|
+
"OrganizationsGetResponseRole",
|
|
19
|
+
"OrganizationsListResponseItem",
|
|
20
|
+
"OrganizationsListResponseItemRole",
|
|
21
|
+
"OrganizationsUpdateResponse",
|
|
22
|
+
"OrganizationsUpdateResponseRole",
|
|
23
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .organizations_create_response_role import OrganizationsCreateResponseRole
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationsCreateResponse(UniversalBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
name: str
|
|
13
|
+
slug: str
|
|
14
|
+
role: OrganizationsCreateResponseRole
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
18
|
+
extra="allow", frozen=True
|
|
19
|
+
) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .organizations_get_response_role import OrganizationsGetResponseRole
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationsGetResponse(UniversalBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
name: str
|
|
13
|
+
slug: str
|
|
14
|
+
role: OrganizationsGetResponseRole
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
18
|
+
extra="allow", frozen=True
|
|
19
|
+
) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .organizations_list_response_item_role import OrganizationsListResponseItemRole
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationsListResponseItem(UniversalBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
name: str
|
|
13
|
+
slug: str
|
|
14
|
+
role: OrganizationsListResponseItemRole
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
18
|
+
extra="allow", frozen=True
|
|
19
|
+
) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .organizations_update_response_role import OrganizationsUpdateResponseRole
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationsUpdateResponse(UniversalBaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
name: str
|
|
13
|
+
slug: str
|
|
14
|
+
role: OrganizationsUpdateResponseRole
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
18
|
+
extra="allow", frozen=True
|
|
19
|
+
) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .types import (
|
|
6
|
+
ProjectsCreateResponse,
|
|
7
|
+
ProjectsGetResponse,
|
|
8
|
+
ProjectsListResponseItem,
|
|
9
|
+
ProjectsUpdateResponse,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"ProjectsCreateResponse",
|
|
14
|
+
"ProjectsGetResponse",
|
|
15
|
+
"ProjectsListResponseItem",
|
|
16
|
+
"ProjectsUpdateResponse",
|
|
17
|
+
]
|
|
@@ -0,0 +1,482 @@
|
|
|
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 AsyncRawProjectsClient, RawProjectsClient
|
|
8
|
+
from .types.projects_create_response import ProjectsCreateResponse
|
|
9
|
+
from .types.projects_get_response import ProjectsGetResponse
|
|
10
|
+
from .types.projects_list_response_item import ProjectsListResponseItem
|
|
11
|
+
from .types.projects_update_response import ProjectsUpdateResponse
|
|
12
|
+
|
|
13
|
+
# this is used as the default value for optional parameters
|
|
14
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ProjectsClient:
|
|
18
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
19
|
+
self._raw_client = RawProjectsClient(client_wrapper=client_wrapper)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def with_raw_response(self) -> RawProjectsClient:
|
|
23
|
+
"""
|
|
24
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
25
|
+
|
|
26
|
+
Returns
|
|
27
|
+
-------
|
|
28
|
+
RawProjectsClient
|
|
29
|
+
"""
|
|
30
|
+
return self._raw_client
|
|
31
|
+
|
|
32
|
+
def list(
|
|
33
|
+
self,
|
|
34
|
+
organization_id: str,
|
|
35
|
+
*,
|
|
36
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
37
|
+
) -> typing.List[ProjectsListResponseItem]:
|
|
38
|
+
"""
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
organization_id : str
|
|
42
|
+
|
|
43
|
+
request_options : typing.Optional[RequestOptions]
|
|
44
|
+
Request-specific configuration.
|
|
45
|
+
|
|
46
|
+
Returns
|
|
47
|
+
-------
|
|
48
|
+
typing.List[ProjectsListResponseItem]
|
|
49
|
+
Success
|
|
50
|
+
|
|
51
|
+
Examples
|
|
52
|
+
--------
|
|
53
|
+
from mirascope.api._generated import Mirascope
|
|
54
|
+
|
|
55
|
+
client = Mirascope()
|
|
56
|
+
client.projects.list(
|
|
57
|
+
organization_id="organizationId",
|
|
58
|
+
)
|
|
59
|
+
"""
|
|
60
|
+
_response = self._raw_client.list(
|
|
61
|
+
organization_id, request_options=request_options
|
|
62
|
+
)
|
|
63
|
+
return _response.data
|
|
64
|
+
|
|
65
|
+
def create(
|
|
66
|
+
self,
|
|
67
|
+
organization_id: str,
|
|
68
|
+
*,
|
|
69
|
+
name: str,
|
|
70
|
+
slug: str,
|
|
71
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
72
|
+
) -> ProjectsCreateResponse:
|
|
73
|
+
"""
|
|
74
|
+
Parameters
|
|
75
|
+
----------
|
|
76
|
+
organization_id : str
|
|
77
|
+
|
|
78
|
+
name : str
|
|
79
|
+
a string at most 100 character(s) long
|
|
80
|
+
|
|
81
|
+
slug : str
|
|
82
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
83
|
+
|
|
84
|
+
request_options : typing.Optional[RequestOptions]
|
|
85
|
+
Request-specific configuration.
|
|
86
|
+
|
|
87
|
+
Returns
|
|
88
|
+
-------
|
|
89
|
+
ProjectsCreateResponse
|
|
90
|
+
Success
|
|
91
|
+
|
|
92
|
+
Examples
|
|
93
|
+
--------
|
|
94
|
+
from mirascope.api._generated import Mirascope
|
|
95
|
+
|
|
96
|
+
client = Mirascope()
|
|
97
|
+
client.projects.create(
|
|
98
|
+
organization_id="organizationId",
|
|
99
|
+
name="name",
|
|
100
|
+
slug="slug",
|
|
101
|
+
)
|
|
102
|
+
"""
|
|
103
|
+
_response = self._raw_client.create(
|
|
104
|
+
organization_id, name=name, slug=slug, request_options=request_options
|
|
105
|
+
)
|
|
106
|
+
return _response.data
|
|
107
|
+
|
|
108
|
+
def get(
|
|
109
|
+
self,
|
|
110
|
+
organization_id: str,
|
|
111
|
+
project_id: str,
|
|
112
|
+
*,
|
|
113
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
114
|
+
) -> ProjectsGetResponse:
|
|
115
|
+
"""
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
organization_id : str
|
|
119
|
+
|
|
120
|
+
project_id : str
|
|
121
|
+
|
|
122
|
+
request_options : typing.Optional[RequestOptions]
|
|
123
|
+
Request-specific configuration.
|
|
124
|
+
|
|
125
|
+
Returns
|
|
126
|
+
-------
|
|
127
|
+
ProjectsGetResponse
|
|
128
|
+
Success
|
|
129
|
+
|
|
130
|
+
Examples
|
|
131
|
+
--------
|
|
132
|
+
from mirascope.api._generated import Mirascope
|
|
133
|
+
|
|
134
|
+
client = Mirascope()
|
|
135
|
+
client.projects.get(
|
|
136
|
+
organization_id="organizationId",
|
|
137
|
+
project_id="projectId",
|
|
138
|
+
)
|
|
139
|
+
"""
|
|
140
|
+
_response = self._raw_client.get(
|
|
141
|
+
organization_id, project_id, request_options=request_options
|
|
142
|
+
)
|
|
143
|
+
return _response.data
|
|
144
|
+
|
|
145
|
+
def update(
|
|
146
|
+
self,
|
|
147
|
+
organization_id: str,
|
|
148
|
+
project_id: str,
|
|
149
|
+
*,
|
|
150
|
+
name: typing.Optional[str] = OMIT,
|
|
151
|
+
slug: typing.Optional[str] = OMIT,
|
|
152
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
153
|
+
) -> ProjectsUpdateResponse:
|
|
154
|
+
"""
|
|
155
|
+
Parameters
|
|
156
|
+
----------
|
|
157
|
+
organization_id : str
|
|
158
|
+
|
|
159
|
+
project_id : str
|
|
160
|
+
|
|
161
|
+
name : typing.Optional[str]
|
|
162
|
+
a string at most 100 character(s) long
|
|
163
|
+
|
|
164
|
+
slug : typing.Optional[str]
|
|
165
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
166
|
+
|
|
167
|
+
request_options : typing.Optional[RequestOptions]
|
|
168
|
+
Request-specific configuration.
|
|
169
|
+
|
|
170
|
+
Returns
|
|
171
|
+
-------
|
|
172
|
+
ProjectsUpdateResponse
|
|
173
|
+
Success
|
|
174
|
+
|
|
175
|
+
Examples
|
|
176
|
+
--------
|
|
177
|
+
from mirascope.api._generated import Mirascope
|
|
178
|
+
|
|
179
|
+
client = Mirascope()
|
|
180
|
+
client.projects.update(
|
|
181
|
+
organization_id="organizationId",
|
|
182
|
+
project_id="projectId",
|
|
183
|
+
)
|
|
184
|
+
"""
|
|
185
|
+
_response = self._raw_client.update(
|
|
186
|
+
organization_id,
|
|
187
|
+
project_id,
|
|
188
|
+
name=name,
|
|
189
|
+
slug=slug,
|
|
190
|
+
request_options=request_options,
|
|
191
|
+
)
|
|
192
|
+
return _response.data
|
|
193
|
+
|
|
194
|
+
def delete(
|
|
195
|
+
self,
|
|
196
|
+
organization_id: str,
|
|
197
|
+
project_id: str,
|
|
198
|
+
*,
|
|
199
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
200
|
+
) -> None:
|
|
201
|
+
"""
|
|
202
|
+
Parameters
|
|
203
|
+
----------
|
|
204
|
+
organization_id : str
|
|
205
|
+
|
|
206
|
+
project_id : str
|
|
207
|
+
|
|
208
|
+
request_options : typing.Optional[RequestOptions]
|
|
209
|
+
Request-specific configuration.
|
|
210
|
+
|
|
211
|
+
Returns
|
|
212
|
+
-------
|
|
213
|
+
None
|
|
214
|
+
|
|
215
|
+
Examples
|
|
216
|
+
--------
|
|
217
|
+
from mirascope.api._generated import Mirascope
|
|
218
|
+
|
|
219
|
+
client = Mirascope()
|
|
220
|
+
client.projects.delete(
|
|
221
|
+
organization_id="organizationId",
|
|
222
|
+
project_id="projectId",
|
|
223
|
+
)
|
|
224
|
+
"""
|
|
225
|
+
_response = self._raw_client.delete(
|
|
226
|
+
organization_id, project_id, request_options=request_options
|
|
227
|
+
)
|
|
228
|
+
return _response.data
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class AsyncProjectsClient:
|
|
232
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
233
|
+
self._raw_client = AsyncRawProjectsClient(client_wrapper=client_wrapper)
|
|
234
|
+
|
|
235
|
+
@property
|
|
236
|
+
def with_raw_response(self) -> AsyncRawProjectsClient:
|
|
237
|
+
"""
|
|
238
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
239
|
+
|
|
240
|
+
Returns
|
|
241
|
+
-------
|
|
242
|
+
AsyncRawProjectsClient
|
|
243
|
+
"""
|
|
244
|
+
return self._raw_client
|
|
245
|
+
|
|
246
|
+
async def list(
|
|
247
|
+
self,
|
|
248
|
+
organization_id: str,
|
|
249
|
+
*,
|
|
250
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
251
|
+
) -> typing.List[ProjectsListResponseItem]:
|
|
252
|
+
"""
|
|
253
|
+
Parameters
|
|
254
|
+
----------
|
|
255
|
+
organization_id : str
|
|
256
|
+
|
|
257
|
+
request_options : typing.Optional[RequestOptions]
|
|
258
|
+
Request-specific configuration.
|
|
259
|
+
|
|
260
|
+
Returns
|
|
261
|
+
-------
|
|
262
|
+
typing.List[ProjectsListResponseItem]
|
|
263
|
+
Success
|
|
264
|
+
|
|
265
|
+
Examples
|
|
266
|
+
--------
|
|
267
|
+
import asyncio
|
|
268
|
+
|
|
269
|
+
from mirascope.api._generated import AsyncMirascope
|
|
270
|
+
|
|
271
|
+
client = AsyncMirascope()
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
async def main() -> None:
|
|
275
|
+
await client.projects.list(
|
|
276
|
+
organization_id="organizationId",
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
asyncio.run(main())
|
|
281
|
+
"""
|
|
282
|
+
_response = await self._raw_client.list(
|
|
283
|
+
organization_id, request_options=request_options
|
|
284
|
+
)
|
|
285
|
+
return _response.data
|
|
286
|
+
|
|
287
|
+
async def create(
|
|
288
|
+
self,
|
|
289
|
+
organization_id: str,
|
|
290
|
+
*,
|
|
291
|
+
name: str,
|
|
292
|
+
slug: str,
|
|
293
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
294
|
+
) -> ProjectsCreateResponse:
|
|
295
|
+
"""
|
|
296
|
+
Parameters
|
|
297
|
+
----------
|
|
298
|
+
organization_id : str
|
|
299
|
+
|
|
300
|
+
name : str
|
|
301
|
+
a string at most 100 character(s) long
|
|
302
|
+
|
|
303
|
+
slug : str
|
|
304
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
305
|
+
|
|
306
|
+
request_options : typing.Optional[RequestOptions]
|
|
307
|
+
Request-specific configuration.
|
|
308
|
+
|
|
309
|
+
Returns
|
|
310
|
+
-------
|
|
311
|
+
ProjectsCreateResponse
|
|
312
|
+
Success
|
|
313
|
+
|
|
314
|
+
Examples
|
|
315
|
+
--------
|
|
316
|
+
import asyncio
|
|
317
|
+
|
|
318
|
+
from mirascope.api._generated import AsyncMirascope
|
|
319
|
+
|
|
320
|
+
client = AsyncMirascope()
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
async def main() -> None:
|
|
324
|
+
await client.projects.create(
|
|
325
|
+
organization_id="organizationId",
|
|
326
|
+
name="name",
|
|
327
|
+
slug="slug",
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
asyncio.run(main())
|
|
332
|
+
"""
|
|
333
|
+
_response = await self._raw_client.create(
|
|
334
|
+
organization_id, name=name, slug=slug, request_options=request_options
|
|
335
|
+
)
|
|
336
|
+
return _response.data
|
|
337
|
+
|
|
338
|
+
async def get(
|
|
339
|
+
self,
|
|
340
|
+
organization_id: str,
|
|
341
|
+
project_id: str,
|
|
342
|
+
*,
|
|
343
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
344
|
+
) -> ProjectsGetResponse:
|
|
345
|
+
"""
|
|
346
|
+
Parameters
|
|
347
|
+
----------
|
|
348
|
+
organization_id : str
|
|
349
|
+
|
|
350
|
+
project_id : str
|
|
351
|
+
|
|
352
|
+
request_options : typing.Optional[RequestOptions]
|
|
353
|
+
Request-specific configuration.
|
|
354
|
+
|
|
355
|
+
Returns
|
|
356
|
+
-------
|
|
357
|
+
ProjectsGetResponse
|
|
358
|
+
Success
|
|
359
|
+
|
|
360
|
+
Examples
|
|
361
|
+
--------
|
|
362
|
+
import asyncio
|
|
363
|
+
|
|
364
|
+
from mirascope.api._generated import AsyncMirascope
|
|
365
|
+
|
|
366
|
+
client = AsyncMirascope()
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
async def main() -> None:
|
|
370
|
+
await client.projects.get(
|
|
371
|
+
organization_id="organizationId",
|
|
372
|
+
project_id="projectId",
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
asyncio.run(main())
|
|
377
|
+
"""
|
|
378
|
+
_response = await self._raw_client.get(
|
|
379
|
+
organization_id, project_id, request_options=request_options
|
|
380
|
+
)
|
|
381
|
+
return _response.data
|
|
382
|
+
|
|
383
|
+
async def update(
|
|
384
|
+
self,
|
|
385
|
+
organization_id: str,
|
|
386
|
+
project_id: str,
|
|
387
|
+
*,
|
|
388
|
+
name: typing.Optional[str] = OMIT,
|
|
389
|
+
slug: typing.Optional[str] = OMIT,
|
|
390
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
391
|
+
) -> ProjectsUpdateResponse:
|
|
392
|
+
"""
|
|
393
|
+
Parameters
|
|
394
|
+
----------
|
|
395
|
+
organization_id : str
|
|
396
|
+
|
|
397
|
+
project_id : str
|
|
398
|
+
|
|
399
|
+
name : typing.Optional[str]
|
|
400
|
+
a string at most 100 character(s) long
|
|
401
|
+
|
|
402
|
+
slug : typing.Optional[str]
|
|
403
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
404
|
+
|
|
405
|
+
request_options : typing.Optional[RequestOptions]
|
|
406
|
+
Request-specific configuration.
|
|
407
|
+
|
|
408
|
+
Returns
|
|
409
|
+
-------
|
|
410
|
+
ProjectsUpdateResponse
|
|
411
|
+
Success
|
|
412
|
+
|
|
413
|
+
Examples
|
|
414
|
+
--------
|
|
415
|
+
import asyncio
|
|
416
|
+
|
|
417
|
+
from mirascope.api._generated import AsyncMirascope
|
|
418
|
+
|
|
419
|
+
client = AsyncMirascope()
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
async def main() -> None:
|
|
423
|
+
await client.projects.update(
|
|
424
|
+
organization_id="organizationId",
|
|
425
|
+
project_id="projectId",
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
asyncio.run(main())
|
|
430
|
+
"""
|
|
431
|
+
_response = await self._raw_client.update(
|
|
432
|
+
organization_id,
|
|
433
|
+
project_id,
|
|
434
|
+
name=name,
|
|
435
|
+
slug=slug,
|
|
436
|
+
request_options=request_options,
|
|
437
|
+
)
|
|
438
|
+
return _response.data
|
|
439
|
+
|
|
440
|
+
async def delete(
|
|
441
|
+
self,
|
|
442
|
+
organization_id: str,
|
|
443
|
+
project_id: str,
|
|
444
|
+
*,
|
|
445
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
446
|
+
) -> None:
|
|
447
|
+
"""
|
|
448
|
+
Parameters
|
|
449
|
+
----------
|
|
450
|
+
organization_id : str
|
|
451
|
+
|
|
452
|
+
project_id : str
|
|
453
|
+
|
|
454
|
+
request_options : typing.Optional[RequestOptions]
|
|
455
|
+
Request-specific configuration.
|
|
456
|
+
|
|
457
|
+
Returns
|
|
458
|
+
-------
|
|
459
|
+
None
|
|
460
|
+
|
|
461
|
+
Examples
|
|
462
|
+
--------
|
|
463
|
+
import asyncio
|
|
464
|
+
|
|
465
|
+
from mirascope.api._generated import AsyncMirascope
|
|
466
|
+
|
|
467
|
+
client = AsyncMirascope()
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
async def main() -> None:
|
|
471
|
+
await client.projects.delete(
|
|
472
|
+
organization_id="organizationId",
|
|
473
|
+
project_id="projectId",
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
asyncio.run(main())
|
|
478
|
+
"""
|
|
479
|
+
_response = await self._raw_client.delete(
|
|
480
|
+
organization_id, project_id, request_options=request_options
|
|
481
|
+
)
|
|
482
|
+
return _response.data
|