capture-runtime-client 0.7.2__tar.gz → 0.8.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.
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/PKG-INFO +1 -1
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/pyproject.toml +2 -2
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/client.py +15 -1
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/assets/contract-set.json +1 -1
- capture_runtime_client-0.8.0/src/capture_runtime_client/private/assets/contract-set.sha256 +1 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/generated_models.py +9 -2
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/start-capture-v2.schema.json +25 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/tests/test_client_sdk.py +94 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/uv.lock +1 -1
- capture_runtime_client-0.7.2/src/capture_runtime_client/private/assets/contract-set.sha256 +0 -1
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/.gitignore +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/README.md +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/project.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/__init__.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/_discovery.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/_error_mapping.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/_retry.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/_transport.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/codec.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/contracts.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/errors.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/__init__.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/assets/__init__.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/__init__.py +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-block.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-document.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-engine.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-event-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-failure-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-ocr-projection-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-operation-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-source.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-speaker.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/capture-streaming-result.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/error-body-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/error-envelope-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-box-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-compute-preflight-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-page-projection-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-page-scope-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-point-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-provenance-resolved-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-provenance-unavailable-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-provenance-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/ocr-raster-v3.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/open-structuring-session-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/page-locator.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/partial-capture-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/raw-capture-segment.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/raw-capture.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-ready.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/structuring-batch-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/structuring-provider-capability-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/structuring-semantic-block-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/structuring-session-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/submit-structuring-batch-v2.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/private/schemas/time-locator.schema.json +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/py.typed +0 -0
- {capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/transport.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "capture-runtime-client"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.8.0"
|
|
8
8
|
description = "Capture Runtime HTTP, in-memory, discovery, and protocol client SDK."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12,<3.15"
|
|
@@ -15,7 +15,7 @@ dependencies = [
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[tool.capture_runtime_client]
|
|
18
|
-
contract_set_sha256 = "
|
|
18
|
+
contract_set_sha256 = "664b2b3244d338dd4de39cbc2f1ee83104d21ee454a11f1d65fd8309d3599670"
|
|
19
19
|
|
|
20
20
|
[tool.hatch.build.targets.wheel]
|
|
21
21
|
packages = ["src/capture_runtime_client"]
|
{capture_runtime_client-0.7.2 → capture_runtime_client-0.8.0}/src/capture_runtime_client/client.py
RENAMED
|
@@ -74,6 +74,9 @@ class CaptureUpload:
|
|
|
74
74
|
# Audio only: label who speaks each segment. Needs the optional
|
|
75
75
|
# speaker-diarization unit; the capture then reports no partial transcript.
|
|
76
76
|
identify_speakers: bool = False
|
|
77
|
+
# Audio only: the language spoken in the recording, one of zh, yue, en, ja,
|
|
78
|
+
# ko, fr, de, it, pt, ru or es. Omit it for Chinese, the speech model's default.
|
|
79
|
+
spoken_language: str | None = None
|
|
77
80
|
|
|
78
81
|
def __post_init__(self) -> None:
|
|
79
82
|
object.__setattr__(
|
|
@@ -233,6 +236,7 @@ class CaptureRuntimeClient:
|
|
|
233
236
|
target_language: str | None = None,
|
|
234
237
|
pdf_page_numbers: Sequence[int] | None = None,
|
|
235
238
|
identify_speakers: bool = False,
|
|
239
|
+
spoken_language: str | None = None,
|
|
236
240
|
) -> CaptureOperation:
|
|
237
241
|
"""Read a local file and start a capture for it (see :meth:`start_capture`)."""
|
|
238
242
|
return self.start_capture(
|
|
@@ -244,6 +248,7 @@ class CaptureRuntimeClient:
|
|
|
244
248
|
target_language=target_language,
|
|
245
249
|
pdf_page_numbers=pdf_page_numbers,
|
|
246
250
|
identify_speakers=identify_speakers,
|
|
251
|
+
spoken_language=spoken_language,
|
|
247
252
|
),
|
|
248
253
|
client_request_id=client_request_id,
|
|
249
254
|
)
|
|
@@ -480,6 +485,8 @@ class CaptureRuntimeClient:
|
|
|
480
485
|
start_payload["pdfPageNumbers"] = list(upload.pdf_page_numbers)
|
|
481
486
|
if upload.identify_speakers:
|
|
482
487
|
start_payload["identifySpeakers"] = True
|
|
488
|
+
if upload.spoken_language is not None:
|
|
489
|
+
start_payload["spokenLanguage"] = upload.spoken_language
|
|
483
490
|
return decode_model(
|
|
484
491
|
self._request(
|
|
485
492
|
"POST",
|
|
@@ -639,9 +646,16 @@ class CaptureRuntimeClient:
|
|
|
639
646
|
)
|
|
640
647
|
|
|
641
648
|
def delete_streaming_capture(self, capture_id: str) -> None:
|
|
642
|
-
"""Delete a capture and its stored artifacts from the runtime.
|
|
649
|
+
"""Delete a capture and its stored artifacts from the runtime.
|
|
650
|
+
|
|
651
|
+
The uploaded source goes with it once no other capture uses it.
|
|
652
|
+
"""
|
|
643
653
|
decode_response(self._request("DELETE", f"/v2/captures/{_safe_id(capture_id)}"))
|
|
644
654
|
|
|
655
|
+
def delete_streaming_ingestion(self, ingestion_id: str) -> None:
|
|
656
|
+
"""Delete an uploaded source; refused while a capture using it is unfinished."""
|
|
657
|
+
decode_response(self._request("DELETE", f"/v2/ingestions/{_safe_id(ingestion_id)}"))
|
|
658
|
+
|
|
645
659
|
def close(self) -> None:
|
|
646
660
|
"""Close the underlying transport."""
|
|
647
661
|
close = getattr(self._transport, "close", None)
|