chunkr-ai 0.1.0a6__tar.gz → 0.1.0a7__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.
- chunkr_ai-0.1.0a7/.release-please-manifest.json +3 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/CHANGELOG.md +54 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/PKG-INFO +14 -13
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/README.md +11 -12
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/api.md +60 -5
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/pyproject.toml +3 -1
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/requirements-dev.lock +13 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/requirements.lock +16 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/__init__.py +2 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_client.py +31 -3
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_constants.py +5 -5
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_exceptions.py +4 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_models.py +1 -1
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_types.py +35 -1
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/__init__.py +1 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_typing.py +5 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_version.py +1 -1
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/resources/__init__.py +14 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/resources/files.py +3 -3
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/resources/tasks/__init__.py +14 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/resources/tasks/extract.py +409 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/resources/tasks/parse.py +492 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/resources/tasks/tasks.py +62 -14
- chunkr_ai-0.1.0a7/src/chunkr_ai/resources/webhooks.py +193 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/__init__.py +41 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/bounding_box.py +19 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/cell.py +39 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/cell_style.py +28 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/chunk.py +40 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/chunk_processing.py +40 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/chunk_processing_param.py +42 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/extract_configuration.py +24 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/extract_output_response.py +19 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/file_create_params.py +2 -1
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/file_info.py +21 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/generation_config.py +29 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/generation_config_param.py +29 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/llm_processing.py +36 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/llm_processing_param.py +36 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/ocr_result.py +28 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/page.py +27 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/parse_configuration.py +64 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/parse_configuration_param.py +65 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/parse_output_response.py +29 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/segment.py +109 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/segment_processing.py +228 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/segment_processing_param.py +229 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/task_extract_updated_webhook_event.py +22 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/task_list_params.py +7 -1
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/task_parse_updated_webhook_event.py +22 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/task_response.py +68 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/__init__.py +12 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_create_params.py +47 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_create_response.py +214 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_get_params.py +21 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_get_response.py +214 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/parse_create_params.py +83 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/parse_create_response.py +55 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/parse_get_params.py +21 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/parse_get_response.py +55 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/unwrap_webhook_event.py +11 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/version_info.py +31 -0
- chunkr_ai-0.1.0a7/src/chunkr_ai/types/webhook_url_response.py +9 -0
- chunkr_ai-0.1.0a7/tests/api_resources/tasks/test_extract.py +434 -0
- chunkr_ai-0.1.0a7/tests/api_resources/tasks/test_parse.py +420 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/api_resources/test_files.py +16 -4
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/api_resources/test_tasks.py +21 -17
- chunkr_ai-0.1.0a7/tests/api_resources/test_webhooks.py +138 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_client.py +28 -28
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/utils.py +9 -1
- chunkr_ai-0.1.0a6/.release-please-manifest.json +0 -3
- chunkr_ai-0.1.0a6/src/chunkr_ai/resources/tasks/parse.py +0 -652
- chunkr_ai-0.1.0a6/src/chunkr_ai/types/__init__.py +0 -15
- chunkr_ai-0.1.0a6/src/chunkr_ai/types/task.py +0 -1225
- chunkr_ai-0.1.0a6/src/chunkr_ai/types/tasks/__init__.py +0 -6
- chunkr_ai-0.1.0a6/src/chunkr_ai/types/tasks/parse_create_params.py +0 -851
- chunkr_ai-0.1.0a6/src/chunkr_ai/types/tasks/parse_update_params.py +0 -845
- chunkr_ai-0.1.0a6/tests/api_resources/tasks/test_parse.py +0 -812
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/.gitignore +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/CONTRIBUTING.md +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/LICENSE +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/SECURITY.md +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/bin/check-release-environment +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/bin/publish-pypi +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/examples/.keep +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/mypy.ini +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/noxfile.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/release-please-config.json +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr/lib/.keep +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_base_client.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_compat.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_files.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_qs.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_resource.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_response.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_streaming.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_logs.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_proxy.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_reflection.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_resources_proxy.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_streams.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_sync.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_transform.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/_utils/_utils.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/lib/.keep +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/pagination.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/py.typed +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/resources/health.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/delete.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/file.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/file_list_params.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/file_url.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/file_url_params.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/files_list_response.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/health_check_response.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/src/chunkr_ai/types/task_get_params.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/__init__.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/api_resources/__init__.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/api_resources/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/api_resources/test_health.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/conftest.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/sample_file.txt +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_deepcopy.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_extract_files.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_files.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_models.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_qs.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_required_args.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_response.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_streaming.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_transform.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_utils/test_proxy.py +0 -0
- {chunkr_ai-0.1.0a6 → chunkr_ai-0.1.0a7}/tests/test_utils/test_typing.py +0 -0
@@ -1,5 +1,59 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.7 (2025-09-01)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([02812f9](https://github.com/lumina-ai-inc/chunkr-python/commit/02812f9d493dd4cae6bb9d266f490dc718b8680c))
|
10
|
+
* **api:** api update ([5d6370e](https://github.com/lumina-ai-inc/chunkr-python/commit/5d6370ed319787e45675bc8bd09f8a00da73f39f))
|
11
|
+
* **api:** api update ([af27299](https://github.com/lumina-ai-inc/chunkr-python/commit/af27299366bb0912cbc2821cebc46bcfabf1feb9))
|
12
|
+
* **api:** api update ([2e3411b](https://github.com/lumina-ai-inc/chunkr-python/commit/2e3411b71c8e14ef2e5498b0642b9b1a37a787fe))
|
13
|
+
* **api:** api update ([0af0a90](https://github.com/lumina-ai-inc/chunkr-python/commit/0af0a90ec0f53bd52a263adaa7112caeb0a0aac4))
|
14
|
+
* **api:** api update ([f6aaa1a](https://github.com/lumina-ai-inc/chunkr-python/commit/f6aaa1aa3f7125e5e849f955ddfd6af016e21b14))
|
15
|
+
* **api:** api update ([8180896](https://github.com/lumina-ai-inc/chunkr-python/commit/818089630b344ade9830799e88bb6a3239829de2))
|
16
|
+
* **api:** api update ([0ba4d05](https://github.com/lumina-ai-inc/chunkr-python/commit/0ba4d05909f42872bd8849a60a57d10e479f0428))
|
17
|
+
* **api:** api update ([911a6c5](https://github.com/lumina-ai-inc/chunkr-python/commit/911a6c5e548bef1499dd57fa6c5502500675ceae))
|
18
|
+
* **api:** api update ([cff79e9](https://github.com/lumina-ai-inc/chunkr-python/commit/cff79e9e362df754ea1eee6a1bc0b10d2a828ea7))
|
19
|
+
* **api:** api update ([4d85d90](https://github.com/lumina-ai-inc/chunkr-python/commit/4d85d9069f57fc4d0fe163d96a2e01b6a0966a9d))
|
20
|
+
* **api:** api update ([ade4cba](https://github.com/lumina-ai-inc/chunkr-python/commit/ade4cba6ba9baf4a1b615aa7b8ccf354eb352553))
|
21
|
+
* **api:** manual updates ([195cc4f](https://github.com/lumina-ai-inc/chunkr-python/commit/195cc4f76978e18da7748de95f3cf1ae653c153d))
|
22
|
+
* **api:** manual updates ([8799814](https://github.com/lumina-ai-inc/chunkr-python/commit/87998148609113db8497a5643bfe7275ce974aad))
|
23
|
+
* **api:** manual updates ([5c16a7d](https://github.com/lumina-ai-inc/chunkr-python/commit/5c16a7d0e3a1395f3633727402f850d1a880a600))
|
24
|
+
* **api:** manual updates ([5ec0746](https://github.com/lumina-ai-inc/chunkr-python/commit/5ec0746f626f52fec003915207bd805e692682e4))
|
25
|
+
* **api:** manual updates ([10e9653](https://github.com/lumina-ai-inc/chunkr-python/commit/10e9653139e8757b90f6cfa0f590732dd9a10fcd))
|
26
|
+
* **api:** manual updates ([6c81d70](https://github.com/lumina-ai-inc/chunkr-python/commit/6c81d70aea548d2361bea74d0bacf750ad374434))
|
27
|
+
* **api:** manual updates ([6b8f3b7](https://github.com/lumina-ai-inc/chunkr-python/commit/6b8f3b7888c28f86ac94e1293bc7b71dcd856cff))
|
28
|
+
* **api:** manual updates ([4342c14](https://github.com/lumina-ai-inc/chunkr-python/commit/4342c141020a1b6fd2aeaa10c3d95c942d54ffd8))
|
29
|
+
* **api:** manual updates ([3c082a0](https://github.com/lumina-ai-inc/chunkr-python/commit/3c082a087c0fa9d6c3763380d2dc85d60cf9c13b))
|
30
|
+
* **api:** manual updates ([d6ae694](https://github.com/lumina-ai-inc/chunkr-python/commit/d6ae6940f6b21802bd50c968cfe63ad5d594042e))
|
31
|
+
* **api:** manual updates ([1e49205](https://github.com/lumina-ai-inc/chunkr-python/commit/1e49205b9eb5557f136a11c4a94ea8f1365bcb69))
|
32
|
+
* **api:** manual updates ([42590a7](https://github.com/lumina-ai-inc/chunkr-python/commit/42590a732126e0b7408fe87a7e0269f0fa18fdf6))
|
33
|
+
* **api:** manual updates ([f066102](https://github.com/lumina-ai-inc/chunkr-python/commit/f06610261af15c371a3cbf277761ffa38a8755fc))
|
34
|
+
* **api:** manual updates ([8c5941a](https://github.com/lumina-ai-inc/chunkr-python/commit/8c5941a515d25b36e01702fc05d4afe6cc09227f))
|
35
|
+
* **api:** manual updates ([2a8991d](https://github.com/lumina-ai-inc/chunkr-python/commit/2a8991d7e8b86713cb522b8545cc5df049832326))
|
36
|
+
* **api:** manual updates ([81dc04d](https://github.com/lumina-ai-inc/chunkr-python/commit/81dc04df72cb26e60103624967136a72809c8035))
|
37
|
+
* **api:** manual updates ([66dc5b0](https://github.com/lumina-ai-inc/chunkr-python/commit/66dc5b0297a117ac3e62b41b2a2830d61a797c5f))
|
38
|
+
* **api:** manual updates ([66600d6](https://github.com/lumina-ai-inc/chunkr-python/commit/66600d68d0077b2c5af8e4d0267929ed8327ac62))
|
39
|
+
* **api:** manual updates ([c6edf0a](https://github.com/lumina-ai-inc/chunkr-python/commit/c6edf0a704b7df24242b037ea0ccf9bdb2754266))
|
40
|
+
* **api:** manual updates ([a54621c](https://github.com/lumina-ai-inc/chunkr-python/commit/a54621cf3982edac65148c2eaeda3bb49de6b135))
|
41
|
+
* **api:** manual updates ([f50efb7](https://github.com/lumina-ai-inc/chunkr-python/commit/f50efb718490e24a57a11592992d7dc6c122cd0e))
|
42
|
+
* **api:** manual updates ([268732f](https://github.com/lumina-ai-inc/chunkr-python/commit/268732f3c680dae25c20a99254356f8c1bc06054))
|
43
|
+
|
44
|
+
|
45
|
+
### Bug Fixes
|
46
|
+
|
47
|
+
* avoid newer type syntax ([e2da818](https://github.com/lumina-ai-inc/chunkr-python/commit/e2da8187ee09cc65bd886d1c9b19efb99dcd7821))
|
48
|
+
|
49
|
+
|
50
|
+
### Chores
|
51
|
+
|
52
|
+
* **internal:** add Sequence related utils ([6fca828](https://github.com/lumina-ai-inc/chunkr-python/commit/6fca8285ff66f8a72c202777dbf44670fc29382c))
|
53
|
+
* **internal:** change ci workflow machines ([d19d52c](https://github.com/lumina-ai-inc/chunkr-python/commit/d19d52c5b853c83781949966f81acc5f14d18573))
|
54
|
+
* **internal:** update pyright exclude list ([0a89f30](https://github.com/lumina-ai-inc/chunkr-python/commit/0a89f30528bda37759ad8d19fcfec1fc43d18329))
|
55
|
+
* update github action ([fa46248](https://github.com/lumina-ai-inc/chunkr-python/commit/fa462489cc7f9061bee1199f95b0d5a724fa4e98))
|
56
|
+
|
3
57
|
## 0.1.0-alpha.6 (2025-08-12)
|
4
58
|
|
5
59
|
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: chunkr-ai
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a7
|
4
4
|
Summary: The official Python library for the chunkr API
|
5
5
|
Project-URL: Homepage, https://github.com/lumina-ai-inc/chunkr-python
|
6
6
|
Project-URL: Repository, https://github.com/lumina-ai-inc/chunkr-python
|
@@ -31,6 +31,8 @@ Requires-Dist: typing-extensions<5,>=4.10
|
|
31
31
|
Provides-Extra: aiohttp
|
32
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
33
33
|
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
34
|
+
Provides-Extra: webhooks
|
35
|
+
Requires-Dist: standardwebhooks; extra == 'webhooks'
|
34
36
|
Description-Content-Type: text/markdown
|
35
37
|
|
36
38
|
# Chunkr Python API library
|
@@ -70,10 +72,10 @@ client = Chunkr(
|
|
70
72
|
api_key=os.environ.get("CHUNKR_API_KEY"), # This is the default and can be omitted
|
71
73
|
)
|
72
74
|
|
73
|
-
|
75
|
+
parse = client.tasks.parse.create(
|
74
76
|
file="string",
|
75
77
|
)
|
76
|
-
print(
|
78
|
+
print(parse.task_id)
|
77
79
|
```
|
78
80
|
|
79
81
|
While you can provide an `api_key` keyword argument,
|
@@ -96,10 +98,10 @@ client = AsyncChunkr(
|
|
96
98
|
|
97
99
|
|
98
100
|
async def main() -> None:
|
99
|
-
|
101
|
+
parse = await client.tasks.parse.create(
|
100
102
|
file="string",
|
101
103
|
)
|
102
|
-
print(
|
104
|
+
print(parse.task_id)
|
103
105
|
|
104
106
|
|
105
107
|
asyncio.run(main())
|
@@ -131,10 +133,10 @@ async def main() -> None:
|
|
131
133
|
api_key="My API Key",
|
132
134
|
http_client=DefaultAioHttpClient(),
|
133
135
|
) as client:
|
134
|
-
|
136
|
+
parse = await client.tasks.parse.create(
|
135
137
|
file="string",
|
136
138
|
)
|
137
|
-
print(
|
139
|
+
print(parse.task_id)
|
138
140
|
|
139
141
|
|
140
142
|
asyncio.run(main())
|
@@ -229,11 +231,11 @@ from chunkr_ai import Chunkr
|
|
229
231
|
|
230
232
|
client = Chunkr()
|
231
233
|
|
232
|
-
|
234
|
+
parse = client.tasks.parse.create(
|
233
235
|
file="file",
|
234
236
|
chunk_processing={},
|
235
237
|
)
|
236
|
-
print(
|
238
|
+
print(parse.chunk_processing)
|
237
239
|
```
|
238
240
|
|
239
241
|
## File uploads
|
@@ -248,7 +250,6 @@ client = Chunkr()
|
|
248
250
|
|
249
251
|
client.files.create(
|
250
252
|
file=Path("/path/to/file"),
|
251
|
-
file_metadata="file_metadata",
|
252
253
|
)
|
253
254
|
```
|
254
255
|
|
@@ -299,7 +300,7 @@ Error codes are as follows:
|
|
299
300
|
|
300
301
|
### Retries
|
301
302
|
|
302
|
-
Certain errors are automatically retried
|
303
|
+
Certain errors are automatically retried 2 times by default, with a short exponential backoff.
|
303
304
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
304
305
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
305
306
|
|
@@ -322,7 +323,7 @@ client.with_options(max_retries=5).tasks.parse.create(
|
|
322
323
|
|
323
324
|
### Timeouts
|
324
325
|
|
325
|
-
By default requests time out after
|
326
|
+
By default requests time out after 1 minute. You can configure this with a `timeout` option,
|
326
327
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
327
328
|
|
328
329
|
```python
|
@@ -330,7 +331,7 @@ from chunkr_ai import Chunkr
|
|
330
331
|
|
331
332
|
# Configure the default for all requests:
|
332
333
|
client = Chunkr(
|
333
|
-
# 20 seconds (default is
|
334
|
+
# 20 seconds (default is 1 minute)
|
334
335
|
timeout=20.0,
|
335
336
|
)
|
336
337
|
|
@@ -35,10 +35,10 @@ client = Chunkr(
|
|
35
35
|
api_key=os.environ.get("CHUNKR_API_KEY"), # This is the default and can be omitted
|
36
36
|
)
|
37
37
|
|
38
|
-
|
38
|
+
parse = client.tasks.parse.create(
|
39
39
|
file="string",
|
40
40
|
)
|
41
|
-
print(
|
41
|
+
print(parse.task_id)
|
42
42
|
```
|
43
43
|
|
44
44
|
While you can provide an `api_key` keyword argument,
|
@@ -61,10 +61,10 @@ client = AsyncChunkr(
|
|
61
61
|
|
62
62
|
|
63
63
|
async def main() -> None:
|
64
|
-
|
64
|
+
parse = await client.tasks.parse.create(
|
65
65
|
file="string",
|
66
66
|
)
|
67
|
-
print(
|
67
|
+
print(parse.task_id)
|
68
68
|
|
69
69
|
|
70
70
|
asyncio.run(main())
|
@@ -96,10 +96,10 @@ async def main() -> None:
|
|
96
96
|
api_key="My API Key",
|
97
97
|
http_client=DefaultAioHttpClient(),
|
98
98
|
) as client:
|
99
|
-
|
99
|
+
parse = await client.tasks.parse.create(
|
100
100
|
file="string",
|
101
101
|
)
|
102
|
-
print(
|
102
|
+
print(parse.task_id)
|
103
103
|
|
104
104
|
|
105
105
|
asyncio.run(main())
|
@@ -194,11 +194,11 @@ from chunkr_ai import Chunkr
|
|
194
194
|
|
195
195
|
client = Chunkr()
|
196
196
|
|
197
|
-
|
197
|
+
parse = client.tasks.parse.create(
|
198
198
|
file="file",
|
199
199
|
chunk_processing={},
|
200
200
|
)
|
201
|
-
print(
|
201
|
+
print(parse.chunk_processing)
|
202
202
|
```
|
203
203
|
|
204
204
|
## File uploads
|
@@ -213,7 +213,6 @@ client = Chunkr()
|
|
213
213
|
|
214
214
|
client.files.create(
|
215
215
|
file=Path("/path/to/file"),
|
216
|
-
file_metadata="file_metadata",
|
217
216
|
)
|
218
217
|
```
|
219
218
|
|
@@ -264,7 +263,7 @@ Error codes are as follows:
|
|
264
263
|
|
265
264
|
### Retries
|
266
265
|
|
267
|
-
Certain errors are automatically retried
|
266
|
+
Certain errors are automatically retried 2 times by default, with a short exponential backoff.
|
268
267
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
269
268
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
270
269
|
|
@@ -287,7 +286,7 @@ client.with_options(max_retries=5).tasks.parse.create(
|
|
287
286
|
|
288
287
|
### Timeouts
|
289
288
|
|
290
|
-
By default requests time out after
|
289
|
+
By default requests time out after 1 minute. You can configure this with a `timeout` option,
|
291
290
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
292
291
|
|
293
292
|
```python
|
@@ -295,7 +294,7 @@ from chunkr_ai import Chunkr
|
|
295
294
|
|
296
295
|
# Configure the default for all requests:
|
297
296
|
client = Chunkr(
|
298
|
-
# 20 seconds (default is
|
297
|
+
# 20 seconds (default is 1 minute)
|
299
298
|
timeout=20.0,
|
300
299
|
)
|
301
300
|
|
@@ -3,22 +3,60 @@
|
|
3
3
|
Types:
|
4
4
|
|
5
5
|
```python
|
6
|
-
from chunkr_ai.types import
|
6
|
+
from chunkr_ai.types import (
|
7
|
+
BoundingBox,
|
8
|
+
Cell,
|
9
|
+
CellStyle,
|
10
|
+
Chunk,
|
11
|
+
ChunkProcessing,
|
12
|
+
ExtractConfiguration,
|
13
|
+
ExtractOutputResponse,
|
14
|
+
FileInfo,
|
15
|
+
GenerationConfig,
|
16
|
+
LlmProcessing,
|
17
|
+
OcrResult,
|
18
|
+
Page,
|
19
|
+
ParseConfiguration,
|
20
|
+
ParseOutputResponse,
|
21
|
+
Segment,
|
22
|
+
SegmentProcessing,
|
23
|
+
TaskResponse,
|
24
|
+
VersionInfo,
|
25
|
+
)
|
7
26
|
```
|
8
27
|
|
9
28
|
Methods:
|
10
29
|
|
11
|
-
- <code title="get /tasks">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">list</a>(\*\*<a href="src/chunkr_ai/types/task_list_params.py">params</a>) -> <a href="./src/chunkr_ai/types/
|
30
|
+
- <code title="get /tasks">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">list</a>(\*\*<a href="src/chunkr_ai/types/task_list_params.py">params</a>) -> <a href="./src/chunkr_ai/types/task_response.py">SyncTasksPage[TaskResponse]</a></code>
|
12
31
|
- <code title="delete /tasks/{task_id}">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">delete</a>(task_id) -> None</code>
|
13
32
|
- <code title="get /tasks/{task_id}/cancel">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">cancel</a>(task_id) -> None</code>
|
14
|
-
- <code title="get /tasks/{task_id}">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">get</a>(task_id, \*\*<a href="src/chunkr_ai/types/task_get_params.py">params</a>) -> <a href="./src/chunkr_ai/types/
|
33
|
+
- <code title="get /tasks/{task_id}">client.tasks.<a href="./src/chunkr_ai/resources/tasks/tasks.py">get</a>(task_id, \*\*<a href="src/chunkr_ai/types/task_get_params.py">params</a>) -> <a href="./src/chunkr_ai/types/task_response.py">TaskResponse</a></code>
|
34
|
+
|
35
|
+
## Extract
|
36
|
+
|
37
|
+
Types:
|
38
|
+
|
39
|
+
```python
|
40
|
+
from chunkr_ai.types.tasks import ExtractCreateResponse, ExtractGetResponse
|
41
|
+
```
|
42
|
+
|
43
|
+
Methods:
|
44
|
+
|
45
|
+
- <code title="post /tasks/extract">client.tasks.extract.<a href="./src/chunkr_ai/resources/tasks/extract.py">create</a>(\*\*<a href="src/chunkr_ai/types/tasks/extract_create_params.py">params</a>) -> <a href="./src/chunkr_ai/types/tasks/extract_create_response.py">ExtractCreateResponse</a></code>
|
46
|
+
- <code title="get /tasks/{task_id}/extract">client.tasks.extract.<a href="./src/chunkr_ai/resources/tasks/extract.py">get</a>(task_id, \*\*<a href="src/chunkr_ai/types/tasks/extract_get_params.py">params</a>) -> <a href="./src/chunkr_ai/types/tasks/extract_get_response.py">ExtractGetResponse</a></code>
|
15
47
|
|
16
48
|
## Parse
|
17
49
|
|
50
|
+
Types:
|
51
|
+
|
52
|
+
```python
|
53
|
+
from chunkr_ai.types.tasks import ParseCreateResponse, ParseGetResponse
|
54
|
+
```
|
55
|
+
|
18
56
|
Methods:
|
19
57
|
|
20
|
-
- <code title="post /tasks/parse">client.tasks.parse.<a href="./src/chunkr_ai/resources/tasks/parse.py">create</a>(\*\*<a href="src/chunkr_ai/types/tasks/parse_create_params.py">params</a>) -> <a href="./src/chunkr_ai/types/
|
21
|
-
- <code title="
|
58
|
+
- <code title="post /tasks/parse">client.tasks.parse.<a href="./src/chunkr_ai/resources/tasks/parse.py">create</a>(\*\*<a href="src/chunkr_ai/types/tasks/parse_create_params.py">params</a>) -> <a href="./src/chunkr_ai/types/tasks/parse_create_response.py">ParseCreateResponse</a></code>
|
59
|
+
- <code title="get /tasks/{task_id}/parse">client.tasks.parse.<a href="./src/chunkr_ai/resources/tasks/parse.py">get</a>(task_id, \*\*<a href="src/chunkr_ai/types/tasks/parse_get_params.py">params</a>) -> <a href="./src/chunkr_ai/types/tasks/parse_get_response.py">ParseGetResponse</a></code>
|
22
60
|
|
23
61
|
# Files
|
24
62
|
|
@@ -48,3 +86,20 @@ from chunkr_ai.types import HealthCheckResponse
|
|
48
86
|
Methods:
|
49
87
|
|
50
88
|
- <code title="get /health">client.health.<a href="./src/chunkr_ai/resources/health.py">check</a>() -> str</code>
|
89
|
+
|
90
|
+
# Webhooks
|
91
|
+
|
92
|
+
Types:
|
93
|
+
|
94
|
+
```python
|
95
|
+
from chunkr_ai.types import (
|
96
|
+
WebhookURLResponse,
|
97
|
+
TaskExtractUpdatedWebhookEvent,
|
98
|
+
TaskParseUpdatedWebhookEvent,
|
99
|
+
UnwrapWebhookEvent,
|
100
|
+
)
|
101
|
+
```
|
102
|
+
|
103
|
+
Methods:
|
104
|
+
|
105
|
+
- <code title="get /webhook/url">client.webhooks.<a href="./src/chunkr_ai/resources/webhooks.py">url</a>() -> <a href="./src/chunkr_ai/types/webhook_url_response.py">WebhookURLResponse</a></code>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "chunkr-ai"
|
3
|
-
version = "0.1.0-alpha.
|
3
|
+
version = "0.1.0-alpha.7"
|
4
4
|
description = "The official Python library for the chunkr API"
|
5
5
|
dynamic = ["readme"]
|
6
6
|
license = "Apache-2.0"
|
@@ -40,6 +40,7 @@ Repository = "https://github.com/lumina-ai-inc/chunkr-python"
|
|
40
40
|
|
41
41
|
[project.optional-dependencies]
|
42
42
|
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
|
43
|
+
webhooks = ["standardwebhooks"]
|
43
44
|
|
44
45
|
[tool.rye]
|
45
46
|
managed = true
|
@@ -148,6 +149,7 @@ exclude = [
|
|
148
149
|
"_dev",
|
149
150
|
".venv",
|
150
151
|
".nox",
|
152
|
+
".git",
|
151
153
|
]
|
152
154
|
|
153
155
|
reportImplicitOverride = true
|
@@ -28,11 +28,14 @@ async-timeout==5.0.1
|
|
28
28
|
# via aiohttp
|
29
29
|
attrs==25.3.0
|
30
30
|
# via aiohttp
|
31
|
+
# via standardwebhooks
|
31
32
|
certifi==2023.7.22
|
32
33
|
# via httpcore
|
33
34
|
# via httpx
|
34
35
|
colorlog==6.7.0
|
35
36
|
# via nox
|
37
|
+
deprecated==1.2.18
|
38
|
+
# via standardwebhooks
|
36
39
|
dirty-equals==0.6.0
|
37
40
|
distlib==0.3.7
|
38
41
|
# via virtualenv
|
@@ -56,6 +59,7 @@ httpx==0.28.1
|
|
56
59
|
# via chunkr-ai
|
57
60
|
# via httpx-aiohttp
|
58
61
|
# via respx
|
62
|
+
# via standardwebhooks
|
59
63
|
httpx-aiohttp==0.1.8
|
60
64
|
# via chunkr-ai
|
61
65
|
idna==3.4
|
@@ -102,6 +106,7 @@ pytest==8.3.3
|
|
102
106
|
pytest-asyncio==0.24.0
|
103
107
|
pytest-xdist==3.7.0
|
104
108
|
python-dateutil==2.8.2
|
109
|
+
# via standardwebhooks
|
105
110
|
# via time-machine
|
106
111
|
pytz==2023.3.post1
|
107
112
|
# via dirty-equals
|
@@ -115,10 +120,16 @@ six==1.16.0
|
|
115
120
|
sniffio==1.3.0
|
116
121
|
# via anyio
|
117
122
|
# via chunkr-ai
|
123
|
+
standardwebhooks==1.0.0
|
124
|
+
# via chunkr-ai
|
118
125
|
time-machine==2.9.0
|
119
126
|
tomli==2.0.2
|
120
127
|
# via mypy
|
121
128
|
# via pytest
|
129
|
+
types-deprecated==1.2.15.20250304
|
130
|
+
# via standardwebhooks
|
131
|
+
types-python-dateutil==2.9.0.20250822
|
132
|
+
# via standardwebhooks
|
122
133
|
typing-extensions==4.12.2
|
123
134
|
# via anyio
|
124
135
|
# via chunkr-ai
|
@@ -129,6 +140,8 @@ typing-extensions==4.12.2
|
|
129
140
|
# via pyright
|
130
141
|
virtualenv==20.24.5
|
131
142
|
# via nox
|
143
|
+
wrapt==1.17.3
|
144
|
+
# via deprecated
|
132
145
|
yarl==1.20.0
|
133
146
|
# via aiohttp
|
134
147
|
zipp==3.17.0
|
@@ -26,9 +26,12 @@ async-timeout==5.0.1
|
|
26
26
|
# via aiohttp
|
27
27
|
attrs==25.3.0
|
28
28
|
# via aiohttp
|
29
|
+
# via standardwebhooks
|
29
30
|
certifi==2023.7.22
|
30
31
|
# via httpcore
|
31
32
|
# via httpx
|
33
|
+
deprecated==1.2.18
|
34
|
+
# via standardwebhooks
|
32
35
|
distro==1.8.0
|
33
36
|
# via chunkr-ai
|
34
37
|
exceptiongroup==1.2.2
|
@@ -43,6 +46,7 @@ httpcore==1.0.9
|
|
43
46
|
httpx==0.28.1
|
44
47
|
# via chunkr-ai
|
45
48
|
# via httpx-aiohttp
|
49
|
+
# via standardwebhooks
|
46
50
|
httpx-aiohttp==0.1.8
|
47
51
|
# via chunkr-ai
|
48
52
|
idna==3.4
|
@@ -59,14 +63,26 @@ pydantic==2.10.3
|
|
59
63
|
# via chunkr-ai
|
60
64
|
pydantic-core==2.27.1
|
61
65
|
# via pydantic
|
66
|
+
python-dateutil==2.9.0.post0
|
67
|
+
# via standardwebhooks
|
68
|
+
six==1.17.0
|
69
|
+
# via python-dateutil
|
62
70
|
sniffio==1.3.0
|
63
71
|
# via anyio
|
64
72
|
# via chunkr-ai
|
73
|
+
standardwebhooks==1.0.0
|
74
|
+
# via chunkr-ai
|
75
|
+
types-deprecated==1.2.15.20250304
|
76
|
+
# via standardwebhooks
|
77
|
+
types-python-dateutil==2.9.0.20250822
|
78
|
+
# via standardwebhooks
|
65
79
|
typing-extensions==4.12.2
|
66
80
|
# via anyio
|
67
81
|
# via chunkr-ai
|
68
82
|
# via multidict
|
69
83
|
# via pydantic
|
70
84
|
# via pydantic-core
|
85
|
+
wrapt==1.17.3
|
86
|
+
# via deprecated
|
71
87
|
yarl==1.20.0
|
72
88
|
# via aiohttp
|
@@ -24,6 +24,7 @@ from ._exceptions import (
|
|
24
24
|
InternalServerError,
|
25
25
|
PermissionDeniedError,
|
26
26
|
UnprocessableEntityError,
|
27
|
+
APIWebhookValidationError,
|
27
28
|
APIResponseValidationError,
|
28
29
|
)
|
29
30
|
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
|
@@ -45,6 +46,7 @@ __all__ = [
|
|
45
46
|
"APITimeoutError",
|
46
47
|
"APIConnectionError",
|
47
48
|
"APIResponseValidationError",
|
49
|
+
"APIWebhookValidationError",
|
48
50
|
"BadRequestError",
|
49
51
|
"AuthenticationError",
|
50
52
|
"PermissionDeniedError",
|
@@ -21,7 +21,7 @@ from ._types import (
|
|
21
21
|
)
|
22
22
|
from ._utils import is_given, get_async_library
|
23
23
|
from ._version import __version__
|
24
|
-
from .resources import files, health
|
24
|
+
from .resources import files, health, webhooks
|
25
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
26
26
|
from ._exceptions import ChunkrError, APIStatusError
|
27
27
|
from ._base_client import (
|
@@ -38,16 +38,19 @@ class Chunkr(SyncAPIClient):
|
|
38
38
|
tasks: tasks.TasksResource
|
39
39
|
files: files.FilesResource
|
40
40
|
health: health.HealthResource
|
41
|
+
webhooks: webhooks.WebhooksResource
|
41
42
|
with_raw_response: ChunkrWithRawResponse
|
42
43
|
with_streaming_response: ChunkrWithStreamedResponse
|
43
44
|
|
44
45
|
# client options
|
45
46
|
api_key: str
|
47
|
+
webhook_key: str | None
|
46
48
|
|
47
49
|
def __init__(
|
48
50
|
self,
|
49
51
|
*,
|
50
52
|
api_key: str | None = None,
|
53
|
+
webhook_key: str | None = None,
|
51
54
|
base_url: str | httpx.URL | None = None,
|
52
55
|
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
|
53
56
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
@@ -69,7 +72,9 @@ class Chunkr(SyncAPIClient):
|
|
69
72
|
) -> None:
|
70
73
|
"""Construct a new synchronous Chunkr client instance.
|
71
74
|
|
72
|
-
This automatically infers the
|
75
|
+
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
|
76
|
+
- `api_key` from `CHUNKR_API_KEY`
|
77
|
+
- `webhook_key` from `CHUNKR_WEBHOOK_KEY`
|
73
78
|
"""
|
74
79
|
if api_key is None:
|
75
80
|
api_key = os.environ.get("CHUNKR_API_KEY")
|
@@ -79,6 +84,10 @@ class Chunkr(SyncAPIClient):
|
|
79
84
|
)
|
80
85
|
self.api_key = api_key
|
81
86
|
|
87
|
+
if webhook_key is None:
|
88
|
+
webhook_key = os.environ.get("CHUNKR_WEBHOOK_KEY")
|
89
|
+
self.webhook_key = webhook_key
|
90
|
+
|
82
91
|
if base_url is None:
|
83
92
|
base_url = os.environ.get("CHUNKR_BASE_URL")
|
84
93
|
if base_url is None:
|
@@ -100,6 +109,7 @@ class Chunkr(SyncAPIClient):
|
|
100
109
|
self.tasks = tasks.TasksResource(self)
|
101
110
|
self.files = files.FilesResource(self)
|
102
111
|
self.health = health.HealthResource(self)
|
112
|
+
self.webhooks = webhooks.WebhooksResource(self)
|
103
113
|
self.with_raw_response = ChunkrWithRawResponse(self)
|
104
114
|
self.with_streaming_response = ChunkrWithStreamedResponse(self)
|
105
115
|
|
@@ -127,6 +137,7 @@ class Chunkr(SyncAPIClient):
|
|
127
137
|
self,
|
128
138
|
*,
|
129
139
|
api_key: str | None = None,
|
140
|
+
webhook_key: str | None = None,
|
130
141
|
base_url: str | httpx.URL | None = None,
|
131
142
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
132
143
|
http_client: httpx.Client | None = None,
|
@@ -161,6 +172,7 @@ class Chunkr(SyncAPIClient):
|
|
161
172
|
http_client = http_client or self._client
|
162
173
|
return self.__class__(
|
163
174
|
api_key=api_key or self.api_key,
|
175
|
+
webhook_key=webhook_key or self.webhook_key,
|
164
176
|
base_url=base_url or self.base_url,
|
165
177
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
166
178
|
http_client=http_client,
|
@@ -212,16 +224,19 @@ class AsyncChunkr(AsyncAPIClient):
|
|
212
224
|
tasks: tasks.AsyncTasksResource
|
213
225
|
files: files.AsyncFilesResource
|
214
226
|
health: health.AsyncHealthResource
|
227
|
+
webhooks: webhooks.AsyncWebhooksResource
|
215
228
|
with_raw_response: AsyncChunkrWithRawResponse
|
216
229
|
with_streaming_response: AsyncChunkrWithStreamedResponse
|
217
230
|
|
218
231
|
# client options
|
219
232
|
api_key: str
|
233
|
+
webhook_key: str | None
|
220
234
|
|
221
235
|
def __init__(
|
222
236
|
self,
|
223
237
|
*,
|
224
238
|
api_key: str | None = None,
|
239
|
+
webhook_key: str | None = None,
|
225
240
|
base_url: str | httpx.URL | None = None,
|
226
241
|
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
|
227
242
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
@@ -243,7 +258,9 @@ class AsyncChunkr(AsyncAPIClient):
|
|
243
258
|
) -> None:
|
244
259
|
"""Construct a new async AsyncChunkr client instance.
|
245
260
|
|
246
|
-
This automatically infers the
|
261
|
+
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
|
262
|
+
- `api_key` from `CHUNKR_API_KEY`
|
263
|
+
- `webhook_key` from `CHUNKR_WEBHOOK_KEY`
|
247
264
|
"""
|
248
265
|
if api_key is None:
|
249
266
|
api_key = os.environ.get("CHUNKR_API_KEY")
|
@@ -253,6 +270,10 @@ class AsyncChunkr(AsyncAPIClient):
|
|
253
270
|
)
|
254
271
|
self.api_key = api_key
|
255
272
|
|
273
|
+
if webhook_key is None:
|
274
|
+
webhook_key = os.environ.get("CHUNKR_WEBHOOK_KEY")
|
275
|
+
self.webhook_key = webhook_key
|
276
|
+
|
256
277
|
if base_url is None:
|
257
278
|
base_url = os.environ.get("CHUNKR_BASE_URL")
|
258
279
|
if base_url is None:
|
@@ -274,6 +295,7 @@ class AsyncChunkr(AsyncAPIClient):
|
|
274
295
|
self.tasks = tasks.AsyncTasksResource(self)
|
275
296
|
self.files = files.AsyncFilesResource(self)
|
276
297
|
self.health = health.AsyncHealthResource(self)
|
298
|
+
self.webhooks = webhooks.AsyncWebhooksResource(self)
|
277
299
|
self.with_raw_response = AsyncChunkrWithRawResponse(self)
|
278
300
|
self.with_streaming_response = AsyncChunkrWithStreamedResponse(self)
|
279
301
|
|
@@ -301,6 +323,7 @@ class AsyncChunkr(AsyncAPIClient):
|
|
301
323
|
self,
|
302
324
|
*,
|
303
325
|
api_key: str | None = None,
|
326
|
+
webhook_key: str | None = None,
|
304
327
|
base_url: str | httpx.URL | None = None,
|
305
328
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
306
329
|
http_client: httpx.AsyncClient | None = None,
|
@@ -335,6 +358,7 @@ class AsyncChunkr(AsyncAPIClient):
|
|
335
358
|
http_client = http_client or self._client
|
336
359
|
return self.__class__(
|
337
360
|
api_key=api_key or self.api_key,
|
361
|
+
webhook_key=webhook_key or self.webhook_key,
|
338
362
|
base_url=base_url or self.base_url,
|
339
363
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
340
364
|
http_client=http_client,
|
@@ -387,6 +411,7 @@ class ChunkrWithRawResponse:
|
|
387
411
|
self.tasks = tasks.TasksResourceWithRawResponse(client.tasks)
|
388
412
|
self.files = files.FilesResourceWithRawResponse(client.files)
|
389
413
|
self.health = health.HealthResourceWithRawResponse(client.health)
|
414
|
+
self.webhooks = webhooks.WebhooksResourceWithRawResponse(client.webhooks)
|
390
415
|
|
391
416
|
|
392
417
|
class AsyncChunkrWithRawResponse:
|
@@ -394,6 +419,7 @@ class AsyncChunkrWithRawResponse:
|
|
394
419
|
self.tasks = tasks.AsyncTasksResourceWithRawResponse(client.tasks)
|
395
420
|
self.files = files.AsyncFilesResourceWithRawResponse(client.files)
|
396
421
|
self.health = health.AsyncHealthResourceWithRawResponse(client.health)
|
422
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithRawResponse(client.webhooks)
|
397
423
|
|
398
424
|
|
399
425
|
class ChunkrWithStreamedResponse:
|
@@ -401,6 +427,7 @@ class ChunkrWithStreamedResponse:
|
|
401
427
|
self.tasks = tasks.TasksResourceWithStreamingResponse(client.tasks)
|
402
428
|
self.files = files.FilesResourceWithStreamingResponse(client.files)
|
403
429
|
self.health = health.HealthResourceWithStreamingResponse(client.health)
|
430
|
+
self.webhooks = webhooks.WebhooksResourceWithStreamingResponse(client.webhooks)
|
404
431
|
|
405
432
|
|
406
433
|
class AsyncChunkrWithStreamedResponse:
|
@@ -408,6 +435,7 @@ class AsyncChunkrWithStreamedResponse:
|
|
408
435
|
self.tasks = tasks.AsyncTasksResourceWithStreamingResponse(client.tasks)
|
409
436
|
self.files = files.AsyncFilesResourceWithStreamingResponse(client.files)
|
410
437
|
self.health = health.AsyncHealthResourceWithStreamingResponse(client.health)
|
438
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithStreamingResponse(client.webhooks)
|
411
439
|
|
412
440
|
|
413
441
|
Client = Chunkr
|
@@ -5,10 +5,10 @@ import httpx
|
|
5
5
|
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
|
6
6
|
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
|
7
7
|
|
8
|
-
# default timeout is
|
9
|
-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=
|
10
|
-
DEFAULT_MAX_RETRIES =
|
8
|
+
# default timeout is 1 minute
|
9
|
+
DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
|
10
|
+
DEFAULT_MAX_RETRIES = 2
|
11
11
|
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
|
12
12
|
|
13
|
-
INITIAL_RETRY_DELAY =
|
14
|
-
MAX_RETRY_DELAY =
|
13
|
+
INITIAL_RETRY_DELAY = 0.5
|
14
|
+
MAX_RETRY_DELAY = 8.0
|