discovery-engine-api 0.2.99__tar.gz → 0.2.101__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.
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/PKG-INFO +1 -3
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/README.md +0 -2
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/__init__.py +1 -1
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/client.py +4 -20
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/types.py +0 -2
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/pyproject.toml +1 -1
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/.gitignore +0 -0
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/errors.py +0 -0
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/__init__.py +0 -0
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/crewai.py +0 -0
- {discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/langchain.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: discovery-engine-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.101
|
|
4
4
|
Summary: Python SDK for Disco API
|
|
5
5
|
Project-URL: Homepage, https://www.leap-labs.com
|
|
6
6
|
Project-URL: Documentation, https://disco.leap-labs.com/llms-full.txt
|
|
@@ -248,7 +248,6 @@ estimate = await engine.estimate(
|
|
|
248
248
|
)
|
|
249
249
|
# estimate["cost"]["credits"] -> 55
|
|
250
250
|
# estimate["cost"]["price_usd"] -> 5.5
|
|
251
|
-
# estimate["time_estimate"]["estimated_seconds"] -> 360
|
|
252
251
|
# estimate["account"]["sufficient"] -> True/False
|
|
253
252
|
# estimate["limits"]["max_analysis_depth"] -> 23 (num_columns - 2)
|
|
254
253
|
```
|
|
@@ -299,7 +298,6 @@ class EngineResult:
|
|
|
299
298
|
queue_position: int | None # Position in queue when pending (1 = next up)
|
|
300
299
|
current_step: str | None # Active pipeline step (preprocessing, training, interpreting, reporting)
|
|
301
300
|
current_step_message: str | None # Human-readable description of the current step
|
|
302
|
-
estimated_seconds: int | None # Estimated total processing time in seconds
|
|
303
301
|
estimated_wait_seconds: int | None # Estimated queue wait time in seconds (pending only)
|
|
304
302
|
error_message: str | None
|
|
305
303
|
report_url: str | None # Shareable link to interactive web report
|
|
@@ -211,7 +211,6 @@ estimate = await engine.estimate(
|
|
|
211
211
|
)
|
|
212
212
|
# estimate["cost"]["credits"] -> 55
|
|
213
213
|
# estimate["cost"]["price_usd"] -> 5.5
|
|
214
|
-
# estimate["time_estimate"]["estimated_seconds"] -> 360
|
|
215
214
|
# estimate["account"]["sufficient"] -> True/False
|
|
216
215
|
# estimate["limits"]["max_analysis_depth"] -> 23 (num_columns - 2)
|
|
217
216
|
```
|
|
@@ -262,7 +261,6 @@ class EngineResult:
|
|
|
262
261
|
queue_position: int | None # Position in queue when pending (1 = next up)
|
|
263
262
|
current_step: str | None # Active pipeline step (preprocessing, training, interpreting, reporting)
|
|
264
263
|
current_step_message: str | None # Human-readable description of the current step
|
|
265
|
-
estimated_seconds: int | None # Estimated total processing time in seconds
|
|
266
264
|
estimated_wait_seconds: int | None # Estimated queue wait time in seconds (pending only)
|
|
267
265
|
error_message: str | None
|
|
268
266
|
report_url: str | None # Shareable link to interactive web report
|
|
@@ -157,9 +157,6 @@ class Engine:
|
|
|
157
157
|
the code interactively, then provisions the account and returns a
|
|
158
158
|
configured Engine with a ``disco_`` API key.
|
|
159
159
|
|
|
160
|
-
If the email service is unavailable, falls back to direct provisioning
|
|
161
|
-
and returns immediately (no code required).
|
|
162
|
-
|
|
163
160
|
Args:
|
|
164
161
|
email: Email address for the new account.
|
|
165
162
|
name: Display name (optional — defaults to email local part).
|
|
@@ -180,7 +177,7 @@ class Engine:
|
|
|
180
177
|
cls._raise_for_status(response)
|
|
181
178
|
data = response.json()
|
|
182
179
|
|
|
183
|
-
#
|
|
180
|
+
# If the server returned a key directly, use it
|
|
184
181
|
if data.get("key"):
|
|
185
182
|
engine = cls(api_key=data["key"], quiet=quiet)
|
|
186
183
|
if not quiet:
|
|
@@ -284,7 +281,6 @@ class Engine:
|
|
|
284
281
|
|
|
285
282
|
This is the primary method. It uploads data, submits the analysis,
|
|
286
283
|
polls for completion, and returns structured results — all in one call.
|
|
287
|
-
Runs typically take 3-15 minutes.
|
|
288
284
|
|
|
289
285
|
Args:
|
|
290
286
|
file: File path, Path object, or pandas DataFrame.
|
|
@@ -440,12 +436,11 @@ class Engine:
|
|
|
440
436
|
self,
|
|
441
437
|
file_size_mb: float,
|
|
442
438
|
num_columns: int,
|
|
443
|
-
num_rows: Optional[int] = None,
|
|
444
439
|
analysis_depth: int = 2,
|
|
445
440
|
visibility: str = "public",
|
|
446
441
|
use_llms: bool = False,
|
|
447
442
|
) -> Dict[str, Any]:
|
|
448
|
-
"""Estimate
|
|
443
|
+
"""Estimate the credit cost for an analysis run.
|
|
449
444
|
|
|
450
445
|
Works with or without authentication. If authenticated, the response
|
|
451
446
|
includes your current credit balance and whether you have enough.
|
|
@@ -453,7 +448,6 @@ class Engine:
|
|
|
453
448
|
Args:
|
|
454
449
|
file_size_mb: Size of the data file in megabytes.
|
|
455
450
|
num_columns: Number of columns in the dataset.
|
|
456
|
-
num_rows: Number of rows (improves time estimate accuracy).
|
|
457
451
|
analysis_depth: Depth iterations (1=fast, higher=deeper).
|
|
458
452
|
visibility: "public" (free, results published) or "private" (costs credits).
|
|
459
453
|
use_llms: Slower and more expensive, but you get smarter pre-processing,
|
|
@@ -461,7 +455,7 @@ class Engine:
|
|
|
461
455
|
always use LLMs.
|
|
462
456
|
|
|
463
457
|
Returns:
|
|
464
|
-
Dict with ``cost``, ``
|
|
458
|
+
Dict with ``cost``, ``limits``, and ``account`` info.
|
|
465
459
|
"""
|
|
466
460
|
client = await self._get_dashboard_client()
|
|
467
461
|
response = await client.post(
|
|
@@ -469,7 +463,6 @@ class Engine:
|
|
|
469
463
|
json={
|
|
470
464
|
"file_size_mb": file_size_mb,
|
|
471
465
|
"num_columns": num_columns,
|
|
472
|
-
"num_rows": num_rows,
|
|
473
466
|
"analysis_depth": analysis_depth,
|
|
474
467
|
"visibility": visibility,
|
|
475
468
|
"use_llms": use_llms,
|
|
@@ -516,7 +509,6 @@ class Engine:
|
|
|
516
509
|
current_step_message=data.get("current_step", {}).get("message")
|
|
517
510
|
if data.get("current_step")
|
|
518
511
|
else None,
|
|
519
|
-
estimated_seconds=data.get("estimated_seconds"),
|
|
520
512
|
estimated_wait_seconds=data.get("estimated_wait_seconds"),
|
|
521
513
|
error_message=data.get("error_message"),
|
|
522
514
|
)
|
|
@@ -600,14 +592,7 @@ class Engine:
|
|
|
600
592
|
else ""
|
|
601
593
|
)
|
|
602
594
|
step_str = f" ({result.current_step}{msg})"
|
|
603
|
-
|
|
604
|
-
if result.estimated_seconds is not None and elapsed > 0:
|
|
605
|
-
remaining = max(0, result.estimated_seconds - elapsed)
|
|
606
|
-
if remaining > 0:
|
|
607
|
-
eta_str = f" | ETA: ~{max(1, round(remaining / 60))} min"
|
|
608
|
-
status_msg = (
|
|
609
|
-
f"Status: {result.status}{step_str} | Elapsed: {elapsed:.1f}s{eta_str}"
|
|
610
|
-
)
|
|
595
|
+
status_msg = f"Status: {result.status}{step_str} | Elapsed: {elapsed:.1f}s"
|
|
611
596
|
self._log(f" {status_msg}")
|
|
612
597
|
|
|
613
598
|
last_status = result.status
|
|
@@ -1188,7 +1173,6 @@ class Engine:
|
|
|
1188
1173
|
current_step_message=data.get("current_step", {}).get("message")
|
|
1189
1174
|
if data.get("current_step")
|
|
1190
1175
|
else None,
|
|
1191
|
-
estimated_seconds=data.get("estimated_seconds"),
|
|
1192
1176
|
estimated_wait_seconds=data.get("estimated_wait_seconds"),
|
|
1193
1177
|
error_message=data.get("error_message"),
|
|
1194
1178
|
report_url=report_url,
|
|
@@ -205,7 +205,6 @@ class EngineResult:
|
|
|
205
205
|
queue_position: Optional[int] = None
|
|
206
206
|
current_step: Optional[str] = None
|
|
207
207
|
current_step_message: Optional[str] = None
|
|
208
|
-
estimated_seconds: Optional[int] = None
|
|
209
208
|
estimated_wait_seconds: Optional[int] = None
|
|
210
209
|
error_message: Optional[str] = None
|
|
211
210
|
|
|
@@ -232,6 +231,5 @@ class RunStatus:
|
|
|
232
231
|
queue_position: Optional[int] = None
|
|
233
232
|
current_step: Optional[str] = None
|
|
234
233
|
current_step_message: Optional[str] = None
|
|
235
|
-
estimated_seconds: Optional[int] = None
|
|
236
234
|
estimated_wait_seconds: Optional[int] = None
|
|
237
235
|
error_message: Optional[str] = None
|
|
File without changes
|
|
File without changes
|
{discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/__init__.py
RENAMED
|
File without changes
|
{discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/crewai.py
RENAMED
|
File without changes
|
{discovery_engine_api-0.2.99 → discovery_engine_api-0.2.101}/discovery/integrations/langchain.py
RENAMED
|
File without changes
|