mostlyai 0.3.1__tar.gz → 0.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mostlyai
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: The official Python client for the MOSTLY AI platform.
5
5
  Home-page: https://app.mostly.ai/
6
6
  License: Proprietary
@@ -13,7 +13,6 @@ from mostlyai.model import (
13
13
  Generator,
14
14
  PermissionLevel,
15
15
  ProgressStatus,
16
- SyntheticDataset,
17
16
  )
18
17
  from mostlyai.shares import _MostlySharesClient
19
18
  from mostlyai.synthetic_datasets import _MostlySyntheticDatasetsClient
@@ -94,6 +93,18 @@ class MostlyAI(_MostlyBaseClient):
94
93
  - secrets
95
94
  - accessToken: keyFile
96
95
  - location: schema.table
96
+ - HIVE
97
+ - config
98
+ - host: string
99
+ - port: integer, default: 10000
100
+ - username: string, optional
101
+ - kerberos_enabled: boolean, default: false
102
+ - kerberos_principal: string, optional
103
+ - kerberos_krb5_conf: string, optional
104
+ - secrets
105
+ - password: string, optional
106
+ - kerberos_keytab: base64-encoded string, optional
107
+ - location: database.table
97
108
  - MARIADB
98
109
  - config
99
110
  - host: string
@@ -252,12 +263,12 @@ class MostlyAI(_MostlyBaseClient):
252
263
  {
253
264
  "name": table,
254
265
  "configuration": {
255
- "sampleSize": size.get(table)
256
- if isinstance(size, dict)
257
- else size,
258
- "sampleSeedData": seed.get(table)
259
- if isinstance(seed, dict)
260
- else seed,
266
+ "sampleSize": (
267
+ size.get(table) if isinstance(size, dict) else size
268
+ ),
269
+ "sampleSeedData": (
270
+ seed.get(table) if isinstance(seed, dict) else seed
271
+ ),
261
272
  },
262
273
  }
263
274
  for table in subject_tables
@@ -331,7 +342,6 @@ class MostlyAI(_MostlyBaseClient):
331
342
  def me(self) -> CurrentUser:
332
343
  """
333
344
  Retrieve current user info.
334
-
335
345
  :return: info about the current user.
336
346
  """
337
347
  return self.request(verb=GET, path=["users", "me"], response_type=CurrentUser)
@@ -15,6 +15,7 @@ class _MostlyConnectorsClient(_MostlyBaseClient, _MostlySharesMixin):
15
15
  offset: int = 0,
16
16
  limit: int = 50,
17
17
  access_type: Optional[str] = None,
18
+ search_term: Optional[str] = None,
18
19
  ) -> Iterator[Connector]:
19
20
  """
20
21
  List connectors.
@@ -25,10 +26,16 @@ class _MostlyConnectorsClient(_MostlyBaseClient, _MostlySharesMixin):
25
26
  :param offset: Offset the entities in the response. Optional. Default: 0
26
27
  :param limit: Limit the number of entities in the response. Optional. Default: 50
27
28
  :param access_type: Filter by access type. Possible values: "SOURCE", "DESTINATION"
29
+ :param search_term: Filter by string in name. Optional
28
30
  :return: Iterator over connectors.
29
31
  """
30
32
  with Paginator(
31
- self, Connector, offset=offset, limit=limit, access_type=access_type
33
+ self,
34
+ Connector,
35
+ offset=offset,
36
+ limit=limit,
37
+ access_type=access_type,
38
+ search_term=search_term,
32
39
  ) as paginator:
33
40
  for item in paginator:
34
41
  yield item
@@ -19,6 +19,7 @@ class _MostlyGeneratorsClient(_MostlyBaseClient, _MostlySharesMixin):
19
19
  offset: int = 0,
20
20
  limit: int = 50,
21
21
  status: Optional[Union[str, list[str]]] = None,
22
+ search_term: Optional[str] = None,
22
23
  ) -> Iterator[Generator]:
23
24
  """
24
25
  List generators.
@@ -28,11 +29,17 @@ class _MostlyGeneratorsClient(_MostlyBaseClient, _MostlySharesMixin):
28
29
  :param offset: Offset the entities in the response. Optional. Default: 0
29
30
  :param limit: Limit the number of entities in the response. Optional. Default: 50
30
31
  :param status: Filter by training status. Optional. Default: None
32
+ :param search_term: Filter by string in name or description. Optional
31
33
  :return: Iterator over generators.
32
34
  """
33
35
  status = ",".join(status) if isinstance(status, list) else status
34
36
  with Paginator(
35
- self, Generator, offset=offset, limit=limit, status=status
37
+ self,
38
+ Generator,
39
+ offset=offset,
40
+ limit=limit,
41
+ status=status,
42
+ search_term=search_term,
36
43
  ) as paginator:
37
44
  for item in paginator:
38
45
  yield item
@@ -1,6 +1,3 @@
1
- from typing import Union
2
- from uuid import UUID
3
-
4
1
  from mostlyai.base import DELETE, GET, POST, _MostlyBaseClient
5
2
  from mostlyai.model import (
6
3
  Connector,
@@ -21,6 +21,7 @@ class _MostlySyntheticDatasetsClient(_MostlyBaseClient):
21
21
  offset: int = 0,
22
22
  limit: int = 50,
23
23
  status: Optional[Union[str, list[str]]] = None,
24
+ search_term: Optional[str] = None,
24
25
  ) -> Iterator[SyntheticDataset]:
25
26
  """
26
27
  List synthetic datasets.
@@ -30,11 +31,17 @@ class _MostlySyntheticDatasetsClient(_MostlyBaseClient):
30
31
  :param offset: Offset the entities in the response. Optional. Default: 0
31
32
  :param limit: Limit the number of entities in the response. Optional. Default: 50
32
33
  :param status: Filter by generation status. Optional. Default: None
34
+ :param search_term: Filter by string in name or description. Optional
33
35
  :return: Iterator over synthetic datasets.
34
36
  """
35
37
  status = ",".join(status) if isinstance(status, list) else status
36
38
  with Paginator(
37
- self, SyntheticDataset, offset=offset, limit=limit, status=status
39
+ self,
40
+ SyntheticDataset,
41
+ offset=offset,
42
+ limit=limit,
43
+ status=status,
44
+ search_term=search_term,
38
45
  ) as paginator:
39
46
  for item in paginator:
40
47
  yield item
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mostlyai"
3
- version = "0.3.1"
3
+ version = "0.3.3"
4
4
  description = "The official Python client for the MOSTLY AI platform."
5
5
  homepage = "https://app.mostly.ai/"
6
6
  authors = ["MOSTLY AI <office@mostly.ai>"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes