mostlyai 0.3.8__tar.gz → 0.3.9__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.8
3
+ Version: 0.3.9
4
4
  Summary: The official Python client for the MOSTLY AI platform.
5
5
  Home-page: https://app.mostly.ai/
6
6
  License: Proprietary
@@ -24,21 +24,24 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  A Python wrapper for the MOSTLY AI platform (https://app.mostly.ai/).
26
26
 
27
- | Intent | Primitive |
28
- |-------------------------------------------------|----------------------------|
29
- | Train a Generative AI on tabular data | `g = mostly.train(data)` |
30
- | Empower your team with safe synthetic data | `mostly.share(g, email)` |
31
- | Generate unlimited synthetic data on demand | `mostly.generate(g, size)` |
32
- | Prompt the generator for the data that you need | `mostly.generate(g, seed)` |
33
- | Connect to any data source within your org | `mostly.connect(config)` |
34
- | Info about the current user | `mostly.me()` |
27
+ | Intent | Primitive |
28
+ |-------------------------------------------------|----------------------------------|
29
+ | Train a Generative AI on tabular data | `g = mostly.train(data)` |
30
+ | Empower your team with safe synthetic data | `mostly.share(g, email)` |
31
+ | Generate any number of synthetic data records | `mostly.generate(g, size)` |
32
+ | Prompt the generator for the data that you need | `mostly.generate(g, seed)` |
33
+ | Live probe the generator on demand | `mostly.probe(g, size \| seed)` |
34
+ | Connect to any data source within your org | `mostly.connect(config)` |
35
+ | Info about the current user | `mostly.me()` |
36
+ | Info about the platform | `mostly.about()` |
35
37
 
36
38
 
37
39
 
38
40
 
39
41
  ## Installation
42
+
40
43
  ```shell
41
- pip install mostlyai
44
+ pip install -U mostlyai
42
45
  ```
43
46
 
44
47
  ## Basic Usage
@@ -46,8 +49,10 @@ pip install mostlyai
46
49
  from mostlyai import MostlyAI
47
50
  mostly = MostlyAI(api_key='your_api_key')
48
51
  g = mostly.train(data) # train a generator on your data
49
- sd = mostly.generate(g) # generate a synthetic dataset
50
- syn = sd.data() # consume synthetic as pd.DataFrame
52
+ mostly.share(g, email) # share the generator with your team
53
+ sd = mostly.generate(g) # use the generator to create a synthetic dataset
54
+ syn = sd.data() # consume the synthetic data as pandas DataFrame(s)
55
+ mostly.probe(g, size=100) # generate few samples on demand
51
56
  ```
52
57
 
53
58
  ## Supported Methods
@@ -131,3 +136,10 @@ sd.shares()
131
136
  c.shares()
132
137
  ```
133
138
 
139
+ ### Info
140
+
141
+ ```python
142
+ mostly.about()
143
+ mostly.me()
144
+ ```
145
+
@@ -2,21 +2,24 @@
2
2
 
3
3
  A Python wrapper for the MOSTLY AI platform (https://app.mostly.ai/).
4
4
 
5
- | Intent | Primitive |
6
- |-------------------------------------------------|----------------------------|
7
- | Train a Generative AI on tabular data | `g = mostly.train(data)` |
8
- | Empower your team with safe synthetic data | `mostly.share(g, email)` |
9
- | Generate unlimited synthetic data on demand | `mostly.generate(g, size)` |
10
- | Prompt the generator for the data that you need | `mostly.generate(g, seed)` |
11
- | Connect to any data source within your org | `mostly.connect(config)` |
12
- | Info about the current user | `mostly.me()` |
5
+ | Intent | Primitive |
6
+ |-------------------------------------------------|----------------------------------|
7
+ | Train a Generative AI on tabular data | `g = mostly.train(data)` |
8
+ | Empower your team with safe synthetic data | `mostly.share(g, email)` |
9
+ | Generate any number of synthetic data records | `mostly.generate(g, size)` |
10
+ | Prompt the generator for the data that you need | `mostly.generate(g, seed)` |
11
+ | Live probe the generator on demand | `mostly.probe(g, size \| seed)` |
12
+ | Connect to any data source within your org | `mostly.connect(config)` |
13
+ | Info about the current user | `mostly.me()` |
14
+ | Info about the platform | `mostly.about()` |
13
15
 
14
16
 
15
17
 
16
18
 
17
19
  ## Installation
20
+
18
21
  ```shell
19
- pip install mostlyai
22
+ pip install -U mostlyai
20
23
  ```
21
24
 
22
25
  ## Basic Usage
@@ -24,8 +27,10 @@ pip install mostlyai
24
27
  from mostlyai import MostlyAI
25
28
  mostly = MostlyAI(api_key='your_api_key')
26
29
  g = mostly.train(data) # train a generator on your data
27
- sd = mostly.generate(g) # generate a synthetic dataset
28
- syn = sd.data() # consume synthetic as pd.DataFrame
30
+ mostly.share(g, email) # share the generator with your team
31
+ sd = mostly.generate(g) # use the generator to create a synthetic dataset
32
+ syn = sd.data() # consume the synthetic data as pandas DataFrame(s)
33
+ mostly.probe(g, size=100) # generate few samples on demand
29
34
  ```
30
35
 
31
36
  ## Supported Methods
@@ -108,3 +113,10 @@ g.shares()
108
113
  sd.shares()
109
114
  c.shares()
110
115
  ```
116
+
117
+ ### Info
118
+
119
+ ```python
120
+ mostly.about()
121
+ mostly.me()
122
+ ```
@@ -1,4 +1,4 @@
1
1
  from mostlyai.api import MostlyAI
2
2
 
3
3
  __all__ = ["MostlyAI"]
4
- __version__ = "0.3.8" # Do not set this manually. Use poetry version [params].
4
+ __version__ = "0.3.9" # Do not set this manually. Use poetry version [params].
@@ -115,12 +115,15 @@ class MostlyAI(_MostlyBaseClient):
115
115
  host: string
116
116
  port: integer, default: 10000
117
117
  username: string (required for regular auth)
118
- kerberos_enabled: boolean, default: false
119
- kerberos_principal: string (required if kerberos_enabled)
120
- kerberos_krb5_conf: string (required if kerberos_enabled)
118
+ kerberosEnabled: boolean, default: false
119
+ kerberosPrincipal: string (required if kerberosEnabled)
120
+ kerberosKrb5Conf: string (required if kerberosEnabled)
121
+ sslEnabled: boolean, default: false
121
122
  secrets:
122
123
  password: string (required for regular auth)
123
- kerberos_keytab: base64-encoded string (required if kerberos_enabled)
124
+ kerberosKeytab: base64-encoded string (required if kerberosEnabled)
125
+ ssl:
126
+ caCertificate: base64-encoded string
124
127
 
125
128
  - type: MARIADB
126
129
  config:
@@ -163,12 +166,13 @@ class MostlyAI(_MostlyBaseClient):
163
166
  port: integer, default: 5432
164
167
  username: string
165
168
  database: string
169
+ sslEnabled: boolean, default: false
166
170
  secrets:
167
171
  password: string
168
172
  ssl:
169
- rootCertificate: string
170
- sslCertificate: string
171
- sslCertificateKey: string
173
+ rootCertificate: base64-encoded string
174
+ sslCertificate: base64-encoded string
175
+ sslCertificateKey: base64-encoded string
172
176
 
173
177
  - type: SNOWFLAKE
174
178
  config:
@@ -370,3 +374,11 @@ class MostlyAI(_MostlyBaseClient):
370
374
  :return: info about the current user.
371
375
  """
372
376
  return self.request(verb=GET, path=["users", "me"], response_type=CurrentUser)
377
+
378
+ def about(self) -> dict[str, Any]:
379
+ """
380
+ Retrieve about info from the endpoint.
381
+ Supported from release v210 onwards.
382
+ :return: info about the platform.
383
+ """
384
+ return self.request(verb=GET, path=["about"])
@@ -213,7 +213,7 @@ class CustomBaseModel(BaseModel):
213
213
  rich.print(self.dict())
214
214
  return capture.get()
215
215
 
216
- def open(self):
216
+ def open(self) -> str:
217
217
  """
218
218
  Opens the instance in a web browser.
219
219
  """
@@ -221,6 +221,7 @@ class CustomBaseModel(BaseModel):
221
221
  raise APIError("Cannot open the instance")
222
222
  url = "/".join([self.client.base_url, *self.OPEN_URL_PARTS, str(self.id)])
223
223
  webbrowser.open_new(url)
224
+ return url
224
225
 
225
226
  def reload(self):
226
227
  """
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mostlyai"
3
- version = "0.3.8"
3
+ version = "0.3.9"
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