capture-runtime-client 0.7.2__tar.gz → 0.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.
Files changed (77) hide show
  1. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/.gitignore +71 -71
  2. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/PKG-INFO +1 -1
  3. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/pyproject.toml +3 -2
  4. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/client.py +28 -1
  5. capture_runtime_client-0.9.0/src/capture_runtime_client/private/assets/contract-set.json +1 -0
  6. capture_runtime_client-0.9.0/src/capture_runtime_client/private/assets/contract-set.sha256 +1 -0
  7. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/generated_models.py +83 -2
  8. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-event-v2.schema.json +39 -0
  9. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-operation-v2.schema.json +52 -0
  10. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-streaming-result.schema.json +52 -0
  11. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +26 -0
  12. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +26 -0
  13. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +13 -0
  14. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +13 -0
  15. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/start-capture-v2.schema.json +25 -0
  16. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/tests/test_client_sdk.py +175 -0
  17. capture_runtime_client-0.9.0/uv.lock +449 -0
  18. capture_runtime_client-0.7.2/src/capture_runtime_client/private/assets/contract-set.json +0 -1
  19. capture_runtime_client-0.7.2/src/capture_runtime_client/private/assets/contract-set.sha256 +0 -1
  20. capture_runtime_client-0.7.2/uv.lock +0 -437
  21. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/README.md +0 -0
  22. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/project.json +0 -0
  23. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/__init__.py +0 -0
  24. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/_discovery.py +0 -0
  25. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/_error_mapping.py +0 -0
  26. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/_retry.py +0 -0
  27. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/_transport.py +0 -0
  28. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/codec.py +0 -0
  29. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/contracts.py +0 -0
  30. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/errors.py +0 -0
  31. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/__init__.py +0 -0
  32. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/assets/__init__.py +0 -0
  33. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/__init__.py +0 -0
  34. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-block.schema.json +0 -0
  35. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-document.schema.json +0 -0
  36. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-engine.schema.json +0 -0
  37. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-failure-v2.schema.json +0 -0
  38. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-ocr-projection-v3.schema.json +0 -0
  39. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-source.schema.json +0 -0
  40. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/capture-speaker.schema.json +0 -0
  41. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/error-body-v2.schema.json +0 -0
  42. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/error-envelope-v2.schema.json +0 -0
  43. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +0 -0
  44. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ingestion-v2.schema.json +0 -0
  45. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-box-v3.schema.json +0 -0
  46. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-compute-preflight-v2.schema.json +0 -0
  47. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-page-projection-v3.schema.json +0 -0
  48. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-page-scope-v2.schema.json +0 -0
  49. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-point-v3.schema.json +0 -0
  50. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-provenance-resolved-v3.schema.json +0 -0
  51. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-provenance-unavailable-v3.schema.json +0 -0
  52. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-provenance-v3.schema.json +0 -0
  53. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/ocr-raster-v3.schema.json +0 -0
  54. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +0 -0
  55. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/open-structuring-session-v2.schema.json +0 -0
  56. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/page-locator.schema.json +0 -0
  57. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/partial-capture-v2.schema.json +0 -0
  58. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/raw-capture-segment.schema.json +0 -0
  59. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/raw-capture.schema.json +0 -0
  60. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +0 -0
  61. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +0 -0
  62. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +0 -0
  63. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +0 -0
  64. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +0 -0
  65. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +0 -0
  66. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-ready.schema.json +0 -0
  67. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +0 -0
  68. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +0 -0
  69. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +0 -0
  70. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/structuring-batch-v2.schema.json +0 -0
  71. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/structuring-provider-capability-v2.schema.json +0 -0
  72. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/structuring-semantic-block-v2.schema.json +0 -0
  73. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/structuring-session-v2.schema.json +0 -0
  74. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/submit-structuring-batch-v2.schema.json +0 -0
  75. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/private/schemas/time-locator.schema.json +0 -0
  76. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/py.typed +0 -0
  77. {capture_runtime_client-0.7.2 → capture_runtime_client-0.9.0}/src/capture_runtime_client/transport.py +0 -0
@@ -1,71 +1,71 @@
1
- # See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2
-
3
- # compiled output
4
- dist
5
- output/
6
- proofshot-artifacts/
7
- tmp
8
- out-tsc
9
-
10
- # dependencies
11
- node_modules
12
- tools/local-registry/storage/
13
- tools/local-registry/htpasswd
14
-
15
- # IDEs and editors
16
- /.idea
17
- .project
18
- .classpath
19
- .c9/
20
- *.launch
21
- .settings/
22
- *.sublime-workspace
23
-
24
- # IDE - VSCode
25
- .vscode/*
26
- !.vscode/settings.json
27
- !.vscode/tasks.json
28
- !.vscode/launch.json
29
- !.vscode/extensions.json
30
-
31
- # misc
32
- /.sass-cache
33
- /connect.lock
34
- /coverage
35
- /libpeerconnection.log
36
- npm-debug.log
37
- yarn-error.log
38
- testem.log
39
- /typings
40
-
41
- # System Files
42
- .DS_Store
43
- Thumbs.db
44
-
45
- .nx/cache
46
- .nx/workspace-data
47
- .claude/worktrees
48
- .claude/settings.local.json
49
-
50
- .angular
51
-
52
- __screenshots__/
53
-
54
- # Python runtime
55
- __pycache__/
56
- *.py[cod]
57
- .pytest_cache/
58
- .ruff_cache/
59
- .venv/
60
-
61
- # Rust / Tauri
62
- target/
63
- apps/capture-workbench-desktop/src-tauri/gen/
64
-
65
- # Local verification data and release output
66
- .capture-workbench/
67
- artifacts/
68
-
69
- .nx/migrate-runs
70
- .venv-diarization/
71
- .venv-speech-recognition/
1
+ # See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2
+
3
+ # compiled output
4
+ dist
5
+ output/
6
+ proofshot-artifacts/
7
+ tmp
8
+ out-tsc
9
+
10
+ # dependencies
11
+ node_modules
12
+ tools/local-registry/storage/
13
+ tools/local-registry/htpasswd
14
+
15
+ # IDEs and editors
16
+ /.idea
17
+ .project
18
+ .classpath
19
+ .c9/
20
+ *.launch
21
+ .settings/
22
+ *.sublime-workspace
23
+
24
+ # IDE - VSCode
25
+ .vscode/*
26
+ !.vscode/settings.json
27
+ !.vscode/tasks.json
28
+ !.vscode/launch.json
29
+ !.vscode/extensions.json
30
+
31
+ # misc
32
+ /.sass-cache
33
+ /connect.lock
34
+ /coverage
35
+ /libpeerconnection.log
36
+ npm-debug.log
37
+ yarn-error.log
38
+ testem.log
39
+ /typings
40
+
41
+ # System Files
42
+ .DS_Store
43
+ Thumbs.db
44
+
45
+ .nx/cache
46
+ .nx/workspace-data
47
+ .claude/worktrees
48
+ .claude/settings.local.json
49
+
50
+ .angular
51
+
52
+ __screenshots__/
53
+
54
+ # Python runtime
55
+ __pycache__/
56
+ *.py[cod]
57
+ .pytest_cache/
58
+ .ruff_cache/
59
+ .venv/
60
+
61
+ # Rust / Tauri
62
+ target/
63
+ apps/capture-workbench-desktop/src-tauri/gen/
64
+
65
+ # Local verification data and release output
66
+ .capture-workbench/
67
+ artifacts/
68
+
69
+ .nx/migrate-runs
70
+ .venv-diarization/
71
+ .venv-speech-recognition/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: capture-runtime-client
3
- Version: 0.7.2
3
+ Version: 0.9.0
4
4
  Summary: Capture Runtime HTTP, in-memory, discovery, and protocol client SDK.
5
5
  License: MIT
6
6
  Requires-Python: <3.15,>=3.12
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "capture-runtime-client"
7
- version = "0.7.2"
7
+ version = "0.9.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 = "60c622670b00e144b174c210e96773e07e7d94ec7c721b33ac65ff6c722c1d93"
18
+ contract_set_sha256 = "91ff5ff5cef6d68774cf036878843503f171044bf8c4a9f6a62e7fb418ce2380"
19
19
 
20
20
  [tool.hatch.build.targets.wheel]
21
21
  packages = ["src/capture_runtime_client"]
@@ -30,6 +30,7 @@ dev = [
30
30
  "mypy>=1.14.0,<2.0.0",
31
31
  "pytest>=8.3.0,<9.0.0",
32
32
  "ruff>=0.9.0,<1.0.0",
33
+ "vulture>=2.14,<3",
33
34
  ]
34
35
 
35
36
  [tool.pytest.ini_options]
@@ -49,6 +49,7 @@ from .contracts import (
49
49
  RuntimeModelInstallation,
50
50
  RuntimeModelOptions,
51
51
  RuntimeReady,
52
+ RuntimeRequirement,
52
53
  RuntimeRequirements,
53
54
  RuntimeStreamingCapabilities,
54
55
  StructuringBatch,
@@ -74,6 +75,9 @@ class CaptureUpload:
74
75
  # Audio only: label who speaks each segment. Needs the optional
75
76
  # speaker-diarization unit; the capture then reports no partial transcript.
76
77
  identify_speakers: bool = False
78
+ # Audio only: the language spoken in the recording, one of zh, yue, en, ja,
79
+ # ko, fr, de, it, pt, ru or es. Omit it for Chinese, the speech model's default.
80
+ spoken_language: str | None = None
77
81
 
78
82
  def __post_init__(self) -> None:
79
83
  object.__setattr__(
@@ -195,6 +199,18 @@ class CaptureRuntimeClient:
195
199
  RuntimeInstallation,
196
200
  )
197
201
 
202
+ def uninstall_requirement(self, requirement_id: str) -> RuntimeRequirement:
203
+ """Remove an installed engine to free disk space; return the requirement, not installed.
204
+
205
+ Uninstalling a requirement that is not installed returns it unchanged.
206
+ """
207
+ return decode_model(
208
+ self._request(
209
+ "DELETE", f"/v2/runtime/requirements/{_safe_id(requirement_id)}/installation"
210
+ ),
211
+ RuntimeRequirement,
212
+ )
213
+
198
214
  def get_model_options(self) -> RuntimeModelOptions:
199
215
  """List the structuring model options the runtime allows."""
200
216
  return decode_model(self._request("GET", "/v2/runtime/model-options"), RuntimeModelOptions)
@@ -233,6 +249,7 @@ class CaptureRuntimeClient:
233
249
  target_language: str | None = None,
234
250
  pdf_page_numbers: Sequence[int] | None = None,
235
251
  identify_speakers: bool = False,
252
+ spoken_language: str | None = None,
236
253
  ) -> CaptureOperation:
237
254
  """Read a local file and start a capture for it (see :meth:`start_capture`)."""
238
255
  return self.start_capture(
@@ -244,6 +261,7 @@ class CaptureRuntimeClient:
244
261
  target_language=target_language,
245
262
  pdf_page_numbers=pdf_page_numbers,
246
263
  identify_speakers=identify_speakers,
264
+ spoken_language=spoken_language,
247
265
  ),
248
266
  client_request_id=client_request_id,
249
267
  )
@@ -480,6 +498,8 @@ class CaptureRuntimeClient:
480
498
  start_payload["pdfPageNumbers"] = list(upload.pdf_page_numbers)
481
499
  if upload.identify_speakers:
482
500
  start_payload["identifySpeakers"] = True
501
+ if upload.spoken_language is not None:
502
+ start_payload["spokenLanguage"] = upload.spoken_language
483
503
  return decode_model(
484
504
  self._request(
485
505
  "POST",
@@ -639,9 +659,16 @@ class CaptureRuntimeClient:
639
659
  )
640
660
 
641
661
  def delete_streaming_capture(self, capture_id: str) -> None:
642
- """Delete a capture and its stored artifacts from the runtime."""
662
+ """Delete a capture and its stored artifacts from the runtime.
663
+
664
+ The uploaded source goes with it once no other capture uses it.
665
+ """
643
666
  decode_response(self._request("DELETE", f"/v2/captures/{_safe_id(capture_id)}"))
644
667
 
668
+ def delete_streaming_ingestion(self, ingestion_id: str) -> None:
669
+ """Delete an uploaded source; refused while a capture using it is unfinished."""
670
+ decode_response(self._request("DELETE", f"/v2/ingestions/{_safe_id(ingestion_id)}"))
671
+
645
672
  def close(self) -> None:
646
673
  """Close the underlying transport."""
647
674
  close = getattr(self._transport, "close", None)