mostlyai 5.8.2__tar.gz → 5.9.0__tar.gz
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.
- {mostlyai-5.8.2 → mostlyai-5.9.0}/PKG-INFO +3 -3
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/api.py +3 -1
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/base.py +2 -2
- mostlyai-5.9.0/mostlyai/sdk/client/integrations.py +154 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/domain.py +186 -1
- {mostlyai-5.8.2 → mostlyai-5.9.0}/pyproject.toml +3 -3
- {mostlyai-5.8.2 → mostlyai-5.9.0}/.gitignore +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/LICENSE +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/README.md +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/auto_detect.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/base.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/databricks.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/hive.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/redshift.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/dtype.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/base.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/azure.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/table/json.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/language_model.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/metadata_objects.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/non_context.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/pull_utils.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/push.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/jobs.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/migration.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/plan.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/routes.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/_base_utils.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/_utils.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/artifacts.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/datasets.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
- {mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.9.0
|
|
4
4
|
Summary: Synthetic Data SDK
|
|
5
5
|
Project-URL: homepage, https://app.mostly.ai/
|
|
6
6
|
Project-URL: repository, https://github.com/mostly-ai/mostlyai
|
|
@@ -60,7 +60,7 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local'
|
|
|
60
60
|
Requires-Dist: filelock>=3.16.1; extra == 'local'
|
|
61
61
|
Requires-Dist: gcsfs>=2023.1.0; extra == 'local'
|
|
62
62
|
Requires-Dist: joblib>=1.4.2; extra == 'local'
|
|
63
|
-
Requires-Dist: mostlyai-engine==2.3.
|
|
63
|
+
Requires-Dist: mostlyai-engine==2.3.2; extra == 'local'
|
|
64
64
|
Requires-Dist: mostlyai-qa==1.9.8; extra == 'local'
|
|
65
65
|
Requires-Dist: networkx<4,>=3.0; extra == 'local'
|
|
66
66
|
Requires-Dist: openpyxl>=3.1.5; extra == 'local'
|
|
@@ -82,7 +82,7 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-gpu'
|
|
|
82
82
|
Requires-Dist: filelock>=3.16.1; extra == 'local-gpu'
|
|
83
83
|
Requires-Dist: gcsfs>=2023.1.0; extra == 'local-gpu'
|
|
84
84
|
Requires-Dist: joblib>=1.4.2; extra == 'local-gpu'
|
|
85
|
-
Requires-Dist: mostlyai-engine[gpu]==2.3.
|
|
85
|
+
Requires-Dist: mostlyai-engine[gpu]==2.3.2; extra == 'local-gpu'
|
|
86
86
|
Requires-Dist: mostlyai-qa==1.9.8; extra == 'local-gpu'
|
|
87
87
|
Requires-Dist: networkx<4,>=3.0; extra == 'local-gpu'
|
|
88
88
|
Requires-Dist: openpyxl>=3.1.5; extra == 'local-gpu'
|
|
@@ -49,4 +49,4 @@ For more information, visit: https://mostly-ai.github.io/mostlyai/
|
|
|
49
49
|
from mostlyai.sdk.client.api import MostlyAI
|
|
50
50
|
|
|
51
51
|
__all__ = ["MostlyAI"]
|
|
52
|
-
__version__ = "5.
|
|
52
|
+
__version__ = "5.9.0" # Do not set this manually. Use poetry version [params].
|
|
@@ -34,6 +34,7 @@ from mostlyai.sdk.client.connectors import _MostlyConnectorsClient
|
|
|
34
34
|
from mostlyai.sdk.client.datasets import _MostlyDatasetsClient
|
|
35
35
|
from mostlyai.sdk.client.exceptions import APIError
|
|
36
36
|
from mostlyai.sdk.client.generators import _MostlyGeneratorsClient
|
|
37
|
+
from mostlyai.sdk.client.integrations import _MostlyIntegrationsClient
|
|
37
38
|
from mostlyai.sdk.client.synthetic_datasets import (
|
|
38
39
|
_MostlySyntheticDatasetsClient,
|
|
39
40
|
_MostlySyntheticProbesClient,
|
|
@@ -228,6 +229,7 @@ class MostlyAI(_MostlyBaseClient):
|
|
|
228
229
|
self.generators = _MostlyGeneratorsClient(**client_kwargs)
|
|
229
230
|
self.datasets = _MostlyDatasetsClient(**client_kwargs)
|
|
230
231
|
self.artifacts = _MostlyArtifactsClient(**client_kwargs)
|
|
232
|
+
self.integrations = _MostlyIntegrationsClient(**client_kwargs)
|
|
231
233
|
self.synthetic_datasets = _MostlySyntheticDatasetsClient(**client_kwargs)
|
|
232
234
|
self.synthetic_probes = _MostlySyntheticProbesClient(**client_kwargs)
|
|
233
235
|
if mode == "LOCAL":
|
|
@@ -259,7 +261,7 @@ class MostlyAI(_MostlyBaseClient):
|
|
|
259
261
|
msg += f" as [bold]{email}[/bold]" if email else ""
|
|
260
262
|
rich.print(msg)
|
|
261
263
|
except Exception as e:
|
|
262
|
-
rich.print(f"Failed to connect to {self.base_url} : {e}
|
|
264
|
+
rich.print(f"Failed to connect to {self.base_url} : {e}")
|
|
263
265
|
else:
|
|
264
266
|
raise ValueError("Invalid SDK mode")
|
|
265
267
|
|
|
@@ -164,10 +164,10 @@ class _MostlyBaseClient:
|
|
|
164
164
|
raise APIStatusError(f"HTTP {exc.response.status_code}: {error_msg}") from None
|
|
165
165
|
except httpx.ReadTimeout as exc:
|
|
166
166
|
# Handle timeout errors
|
|
167
|
-
raise APIError(f"Timed out while requesting {exc.request.url!r}.") from None
|
|
167
|
+
raise APIError(f"Timed out while requesting {str(exc.request.url)!r}.") from None
|
|
168
168
|
except httpx.RequestError as exc:
|
|
169
169
|
# Handle request errors (e.g., network issues)
|
|
170
|
-
raise APIError(f"An error occurred while requesting {exc.request.url!r}.") from None
|
|
170
|
+
raise APIError(f"An error occurred while requesting {str(exc.request.url)!r} ({exc}).") from None
|
|
171
171
|
|
|
172
172
|
if raw_response:
|
|
173
173
|
return response
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Copyright 2024-2025 MOSTLY AI
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import rich
|
|
18
|
+
|
|
19
|
+
from mostlyai.sdk.client.base import (
|
|
20
|
+
DELETE,
|
|
21
|
+
GET,
|
|
22
|
+
POST,
|
|
23
|
+
_MostlyBaseClient,
|
|
24
|
+
)
|
|
25
|
+
from mostlyai.sdk.domain import (
|
|
26
|
+
Integration,
|
|
27
|
+
IntegrationAuthorizationRequest,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class _MostlyIntegrationsClient(_MostlyBaseClient):
|
|
32
|
+
SECTION = ["integrations"]
|
|
33
|
+
|
|
34
|
+
# PUBLIC METHODS #
|
|
35
|
+
|
|
36
|
+
def list(self) -> list[Integration]:
|
|
37
|
+
"""
|
|
38
|
+
List integrations.
|
|
39
|
+
|
|
40
|
+
Returns all integrations accessible by the user.
|
|
41
|
+
|
|
42
|
+
Example for listing all integrations:
|
|
43
|
+
```python
|
|
44
|
+
from mostlyai.sdk import MostlyAI
|
|
45
|
+
mostly = MostlyAI()
|
|
46
|
+
integrations = mostly.integrations.list()
|
|
47
|
+
for i in integrations:
|
|
48
|
+
print(f"Integration `{i.provider_name}` ({i.status}, {i.provider_id})")
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
list[Integration]: A list of integration objects.
|
|
53
|
+
"""
|
|
54
|
+
response = self.request(verb=GET, path=[])
|
|
55
|
+
return [Integration(**item) for item in response]
|
|
56
|
+
|
|
57
|
+
def get(self, provider_id: str) -> Integration:
|
|
58
|
+
"""
|
|
59
|
+
Retrieve an integration by its provider ID.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
provider_id: The provider identifier (e.g., "google", "slack", "github").
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Integration: The retrieved integration object.
|
|
66
|
+
|
|
67
|
+
Example for retrieving an integration:
|
|
68
|
+
```python
|
|
69
|
+
from mostlyai.sdk import MostlyAI
|
|
70
|
+
mostly = MostlyAI()
|
|
71
|
+
i = mostly.integrations.get('google')
|
|
72
|
+
i
|
|
73
|
+
```
|
|
74
|
+
"""
|
|
75
|
+
response = self.request(verb=GET, path=[provider_id], response_type=Integration)
|
|
76
|
+
return response
|
|
77
|
+
|
|
78
|
+
def authorize(
|
|
79
|
+
self,
|
|
80
|
+
provider: str,
|
|
81
|
+
scope_ids: list[str],
|
|
82
|
+
) -> str:
|
|
83
|
+
"""
|
|
84
|
+
Generate an OAuth authorization URL for connecting an integration.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
provider: The OAuth provider identifier (e.g., "google", "slack", "github").
|
|
88
|
+
scope_ids: List of scope identifiers for this integration.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
str: The OAuth authorization URL.
|
|
92
|
+
|
|
93
|
+
Example for generating an authorization URL:
|
|
94
|
+
```python
|
|
95
|
+
from mostlyai.sdk import MostlyAI
|
|
96
|
+
mostly = MostlyAI()
|
|
97
|
+
url = mostly.integrations.authorize(
|
|
98
|
+
provider='google',
|
|
99
|
+
scope_ids=['550e8400-e29b-41d4-a716-446655440000']
|
|
100
|
+
)
|
|
101
|
+
print(f"Visit this URL to authorize: {url}")
|
|
102
|
+
```
|
|
103
|
+
"""
|
|
104
|
+
config = IntegrationAuthorizationRequest(scope_ids=scope_ids)
|
|
105
|
+
response = self.request(
|
|
106
|
+
verb=POST,
|
|
107
|
+
path=[provider, "authorize"],
|
|
108
|
+
json=config,
|
|
109
|
+
response_type=dict,
|
|
110
|
+
do_response_dict_snake_case=True,
|
|
111
|
+
)
|
|
112
|
+
return response.get("authorization_url", "")
|
|
113
|
+
|
|
114
|
+
def refresh(self, provider_id: str) -> None:
|
|
115
|
+
"""
|
|
116
|
+
Refresh integration OAuth token.
|
|
117
|
+
|
|
118
|
+
Refresh the OAuth access token for an integration.
|
|
119
|
+
If the integration has a refresh token, it will be used to obtain new access tokens.
|
|
120
|
+
If no refresh token exists, a new authorization flow must be initiated.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
provider_id: The provider identifier (e.g., "google", "slack", "github").
|
|
124
|
+
|
|
125
|
+
Example for refreshing an integration token:
|
|
126
|
+
```python
|
|
127
|
+
from mostlyai.sdk import MostlyAI
|
|
128
|
+
mostly = MostlyAI()
|
|
129
|
+
mostly.integrations.refresh('google')
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
APIError: If the integration is not found (404) or no refresh token is available (400).
|
|
134
|
+
"""
|
|
135
|
+
self.request(verb=POST, path=[provider_id, "refresh"])
|
|
136
|
+
|
|
137
|
+
def disconnect(self, provider_id: str) -> None:
|
|
138
|
+
"""
|
|
139
|
+
Disconnect an integration.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
provider_id: The provider identifier (e.g., "google", "slack", "github").
|
|
143
|
+
|
|
144
|
+
Example for disconnecting an integration:
|
|
145
|
+
```python
|
|
146
|
+
from mostlyai.sdk import MostlyAI
|
|
147
|
+
mostly = MostlyAI()
|
|
148
|
+
mostly.integrations.disconnect('google')
|
|
149
|
+
```
|
|
150
|
+
"""
|
|
151
|
+
self.request(verb=DELETE, path=[provider_id])
|
|
152
|
+
rich.print(
|
|
153
|
+
f"Disconnected integration [link={self.base_url}/d/integrations/{provider_id} dodger_blue2 underline]{provider_id}[/]"
|
|
154
|
+
)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
# generated by datamodel-codegen:
|
|
16
|
-
# timestamp: 2025-
|
|
16
|
+
# timestamp: 2025-12-10T14:46:14+00:00
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
@@ -235,6 +235,88 @@ class NotificationType(str, Enum):
|
|
|
235
235
|
member_joined = "MEMBER_JOINED"
|
|
236
236
|
|
|
237
237
|
|
|
238
|
+
class IntegrationStatus(str, Enum):
|
|
239
|
+
"""
|
|
240
|
+
Status of an integration connection
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
connected = "CONNECTED"
|
|
244
|
+
not_connected = "NOT_CONNECTED"
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
class IntegrationScope(CustomBaseModel):
|
|
248
|
+
"""
|
|
249
|
+
OAuth scope information for an integration
|
|
250
|
+
"""
|
|
251
|
+
|
|
252
|
+
id: str = Field(
|
|
253
|
+
...,
|
|
254
|
+
description="Unique identifier for the scope",
|
|
255
|
+
examples=["550e8400-e29b-41d4-a716-446655440000"],
|
|
256
|
+
)
|
|
257
|
+
name: str = Field(
|
|
258
|
+
...,
|
|
259
|
+
description="Display name of the scope",
|
|
260
|
+
examples=["Google Drive (Read Only)"],
|
|
261
|
+
)
|
|
262
|
+
description: str | None = Field(
|
|
263
|
+
None,
|
|
264
|
+
description="Description of what this scope allows",
|
|
265
|
+
examples=["Read-only access to your Google Drive files"],
|
|
266
|
+
)
|
|
267
|
+
value: str = Field(
|
|
268
|
+
...,
|
|
269
|
+
description="The actual OAuth scope value",
|
|
270
|
+
examples=["https://www.googleapis.com/auth/drive.readonly"],
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
class IntegrationAuthorizationRequest(CustomBaseModel):
|
|
275
|
+
"""
|
|
276
|
+
Request to generate an OAuth authorization URL
|
|
277
|
+
"""
|
|
278
|
+
|
|
279
|
+
scope_ids: list[str] = Field(
|
|
280
|
+
...,
|
|
281
|
+
alias="scopeIds",
|
|
282
|
+
description="List of scope identifiers for this integration",
|
|
283
|
+
examples=[["550e8400-e29b-41d4-a716-446655440000"]],
|
|
284
|
+
min_length=1,
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
class ProviderScopeConfig(CustomBaseModel):
|
|
289
|
+
"""
|
|
290
|
+
OAuth scope definition
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
id: str = Field(
|
|
294
|
+
...,
|
|
295
|
+
description="Unique identifier for the scope",
|
|
296
|
+
examples=["550e8400-e29b-41d4-a716-446655440000"],
|
|
297
|
+
)
|
|
298
|
+
name: str = Field(
|
|
299
|
+
...,
|
|
300
|
+
description="Display name of the scope",
|
|
301
|
+
examples=["Google Drive (Read Only)"],
|
|
302
|
+
)
|
|
303
|
+
description: str | None = Field(
|
|
304
|
+
None,
|
|
305
|
+
description="Description of what this scope allows",
|
|
306
|
+
examples=["Read-only access to your Google Drive files"],
|
|
307
|
+
)
|
|
308
|
+
value: str = Field(
|
|
309
|
+
...,
|
|
310
|
+
description="The actual OAuth scope value",
|
|
311
|
+
examples=["https://www.googleapis.com/auth/drive.readonly"],
|
|
312
|
+
)
|
|
313
|
+
is_default: bool | None = Field(
|
|
314
|
+
False,
|
|
315
|
+
alias="isDefault",
|
|
316
|
+
description="Whether this scope is selected by default",
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
238
320
|
class PaginatedTotalCount(RootModel[int]):
|
|
239
321
|
root: int = Field(..., description="The total number of entities within the list")
|
|
240
322
|
|
|
@@ -1032,6 +1114,7 @@ class AssistantMessageContentType(str, Enum):
|
|
|
1032
1114
|
artifact_connector = "artifact/connector"
|
|
1033
1115
|
artifact_dataset = "artifact/dataset"
|
|
1034
1116
|
artifact_shareable_artifact = "artifact/shareable-artifact"
|
|
1117
|
+
artifact_integration = "artifact/integration"
|
|
1035
1118
|
compact_boundary = "compact_boundary"
|
|
1036
1119
|
|
|
1037
1120
|
|
|
@@ -2002,6 +2085,100 @@ class Notification(CustomBaseModel):
|
|
|
2002
2085
|
)
|
|
2003
2086
|
|
|
2004
2087
|
|
|
2088
|
+
class Integration(CustomBaseModel):
|
|
2089
|
+
"""
|
|
2090
|
+
An OAuth2 integration provider with connection status. If connected, includes integration details. If not connected, shows NOT_CONNECTED status.
|
|
2091
|
+
"""
|
|
2092
|
+
|
|
2093
|
+
provider_id: str = Field(
|
|
2094
|
+
...,
|
|
2095
|
+
alias="providerId",
|
|
2096
|
+
description="The provider identifier",
|
|
2097
|
+
examples=["google"],
|
|
2098
|
+
)
|
|
2099
|
+
provider_name: str = Field(
|
|
2100
|
+
...,
|
|
2101
|
+
alias="providerName",
|
|
2102
|
+
description="Display name of the provider",
|
|
2103
|
+
examples=["Google"],
|
|
2104
|
+
)
|
|
2105
|
+
icon: str | None = Field(None, description="svg image")
|
|
2106
|
+
is_promoted: bool | None = Field(
|
|
2107
|
+
None,
|
|
2108
|
+
alias="isPromoted",
|
|
2109
|
+
description="Whether this provider is promoted in the UI",
|
|
2110
|
+
examples=[True],
|
|
2111
|
+
)
|
|
2112
|
+
scope_ids: list[str] | None = Field(
|
|
2113
|
+
None,
|
|
2114
|
+
alias="scopeIds",
|
|
2115
|
+
description="List of IDs of the currently connected scopes (empty if not connected)",
|
|
2116
|
+
examples=[["550e8400-e29b-41d4-a716-446655440000"]],
|
|
2117
|
+
)
|
|
2118
|
+
available_scopes: list[IntegrationScope] = Field(
|
|
2119
|
+
...,
|
|
2120
|
+
alias="availableScopes",
|
|
2121
|
+
description="List of all available scopes for this provider",
|
|
2122
|
+
)
|
|
2123
|
+
status: IntegrationStatus
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
class IntegrationProvidersConfig(CustomBaseModel):
|
|
2127
|
+
"""
|
|
2128
|
+
Configuration for a single integration provider
|
|
2129
|
+
"""
|
|
2130
|
+
|
|
2131
|
+
id: str = Field(..., description="Unique identifier for the provider", examples=["google"])
|
|
2132
|
+
name: str = Field(..., description="Display name of the provider", examples=["Google"])
|
|
2133
|
+
description: str | None = Field(
|
|
2134
|
+
None,
|
|
2135
|
+
description="Description of the provider",
|
|
2136
|
+
examples=["Connect to Google services"],
|
|
2137
|
+
)
|
|
2138
|
+
icon: str | None = Field(None, description="svg image")
|
|
2139
|
+
is_promoted: bool | None = Field(
|
|
2140
|
+
None,
|
|
2141
|
+
alias="isPromoted",
|
|
2142
|
+
description="Whether this provider is promoted in the UI",
|
|
2143
|
+
)
|
|
2144
|
+
authorization_url: str = Field(
|
|
2145
|
+
...,
|
|
2146
|
+
alias="authorizationUrl",
|
|
2147
|
+
description="OAuth authorization endpoint URL",
|
|
2148
|
+
examples=["https://accounts.google.com/o/oauth2/v2/auth"],
|
|
2149
|
+
)
|
|
2150
|
+
access_token_url: str = Field(
|
|
2151
|
+
...,
|
|
2152
|
+
alias="accessTokenUrl",
|
|
2153
|
+
description="OAuth token endpoint URL",
|
|
2154
|
+
examples=["https://oauth2.googleapis.com/token"],
|
|
2155
|
+
)
|
|
2156
|
+
scopes: list[ProviderScopeConfig] | None = Field(None, description="Available OAuth scopes for this provider")
|
|
2157
|
+
additional_params: dict[str, str] | None = Field(
|
|
2158
|
+
None,
|
|
2159
|
+
alias="additionalParams",
|
|
2160
|
+
description="Additional parameters to include in OAuth requests",
|
|
2161
|
+
)
|
|
2162
|
+
client_id: str = Field(
|
|
2163
|
+
...,
|
|
2164
|
+
alias="clientId",
|
|
2165
|
+
description="OAuth client ID",
|
|
2166
|
+
examples=["your-client-id"],
|
|
2167
|
+
)
|
|
2168
|
+
client_secret: str = Field(
|
|
2169
|
+
...,
|
|
2170
|
+
alias="clientSecret",
|
|
2171
|
+
description="OAuth client secret",
|
|
2172
|
+
examples=["your-client-secret"],
|
|
2173
|
+
)
|
|
2174
|
+
scope_delimiter: str | None = Field(
|
|
2175
|
+
" ",
|
|
2176
|
+
alias="scopeDelimiter",
|
|
2177
|
+
description="Delimiter used to join multiple scope values (e.g., space for GitHub, comma for others)",
|
|
2178
|
+
examples=[" "],
|
|
2179
|
+
)
|
|
2180
|
+
|
|
2181
|
+
|
|
2005
2182
|
class Metadata(CustomBaseModel):
|
|
2006
2183
|
"""
|
|
2007
2184
|
The metadata of a resource.
|
|
@@ -3065,6 +3242,14 @@ class ModelMetrics(CustomBaseModel):
|
|
|
3065
3242
|
similarity: Similarity | None = None
|
|
3066
3243
|
|
|
3067
3244
|
|
|
3245
|
+
class IntegrationProvidersConfigList(CustomBaseModel):
|
|
3246
|
+
"""
|
|
3247
|
+
Configuration to create or update multiple integration providers
|
|
3248
|
+
"""
|
|
3249
|
+
|
|
3250
|
+
providers: list[IntegrationProvidersConfig]
|
|
3251
|
+
|
|
3252
|
+
|
|
3068
3253
|
class SourceTable(CustomBaseModel):
|
|
3069
3254
|
"""
|
|
3070
3255
|
A table as part of a generator.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mostlyai"
|
|
3
|
-
version = "5.
|
|
3
|
+
version = "5.9.0"
|
|
4
4
|
description = "Synthetic Data SDK"
|
|
5
5
|
authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
|
|
6
6
|
requires-python = ">=3.10,<3.14"
|
|
@@ -50,7 +50,7 @@ dependencies = [
|
|
|
50
50
|
local = [
|
|
51
51
|
# "mostlyai-engine @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
|
|
52
52
|
# "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
|
|
53
|
-
"mostlyai-engine==2.3.
|
|
53
|
+
"mostlyai-engine==2.3.2", # for release
|
|
54
54
|
"mostlyai-qa==1.9.8", # for release
|
|
55
55
|
"fastapi>=0.115.6,<0.116",
|
|
56
56
|
"uvicorn>=0.34.0,<0.35",
|
|
@@ -76,7 +76,7 @@ local = [
|
|
|
76
76
|
local-gpu = [
|
|
77
77
|
# "mostlyai-engine[gpu] @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
|
|
78
78
|
# "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
|
|
79
|
-
"mostlyai-engine[gpu]==2.3.
|
|
79
|
+
"mostlyai-engine[gpu]==2.3.2", # for release
|
|
80
80
|
"mostlyai-qa==1.9.8", # for release
|
|
81
81
|
"fastapi>=0.115.6,<0.116",
|
|
82
82
|
"uvicorn>=0.34.0,<0.35",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_analyze_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_encode_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-5.8.2 → mostlyai-5.9.0}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|