chunkr-ai 0.1.0a8__tar.gz → 0.1.0a9__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.0a9/.release-please-manifest.json +3 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/CHANGELOG.md +16 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/PKG-INFO +1 -1
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/pyproject.toml +1 -1
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/requirements-dev.lock +5 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/requirements.lock +5 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/__init__.py +3 -1
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_base_client.py +9 -9
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_client.py +8 -8
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_models.py +10 -4
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_qs.py +7 -7
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_types.py +18 -11
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_transform.py +2 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_utils.py +4 -4
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_version.py +1 -1
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/files.py +29 -29
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/health.py +3 -3
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/extract.py +17 -17
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/parse.py +25 -34
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/tasks.py +31 -31
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/webhooks.py +3 -3
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/__init__.py +0 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_info.py +3 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/ocr_result.py +6 -6
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_configuration.py +0 -4
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_configuration_param.py +0 -4
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment.py +8 -5
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment_processing.py +92 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment_processing_param.py +92 -2
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_create_params.py +0 -4
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/version_info.py +1 -1
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/test_extract.py +74 -16
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/test_parse.py +74 -16
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_transform.py +9 -2
- chunkr_ai-0.1.0a8/.release-please-manifest.json +0 -3
- chunkr_ai-0.1.0a8/src/chunkr_ai/types/llm_processing.py +0 -36
- chunkr_ai-0.1.0a8/src/chunkr_ai/types/llm_processing_param.py +0 -36
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/.gitignore +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/CONTRIBUTING.md +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/LICENSE +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/README.md +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/SECURITY.md +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/api.md +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/bin/check-release-environment +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/bin/publish-pypi +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/examples/.keep +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/noxfile.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/release-please-config.json +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr/lib/.keep +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_compat.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_constants.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_exceptions.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_files.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_resource.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_streaming.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_compat.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_datetime_parse.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_logs.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_proxy.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_reflection.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_resources_proxy.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_streams.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_sync.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_typing.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/lib/.keep +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/pagination.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/py.typed +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/bounding_box.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/cell.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/cell_style.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk_processing.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk_processing_param.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/delete.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/extract_configuration.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/extract_output_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_create_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_list_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_url.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_url_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/files_list_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/generation_config.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/generation_config_param.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/health_check_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/page.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_output_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_extract_updated_webhook_event.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_get_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_list_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_parse_updated_webhook_event.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_create_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_create_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_get_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_get_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_create_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_get_params.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_get_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/unwrap_webhook_event.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/webhook_url_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/test_files.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/test_health.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/test_tasks.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/api_resources/test_webhooks.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/conftest.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/sample_file.txt +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_client.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_deepcopy.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_extract_files.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_files.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_models.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_qs.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_required_args.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_response.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_streaming.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_utils/test_datetime_parse.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_utils/test_proxy.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/test_utils/test_typing.py +0 -0
- {chunkr_ai-0.1.0a8 → chunkr_ai-0.1.0a9}/tests/utils.py +0 -0
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.9 (2025-10-01)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([03abedc](https://github.com/lumina-ai-inc/chunkr-python/commit/03abedc9f8c77b63d2c64e88cc63ed1c1d33a607))
|
10
|
+
* **api:** api update ([c07c222](https://github.com/lumina-ai-inc/chunkr-python/commit/c07c2228b5c06ed68ffcf55d591c181b32c4e548))
|
11
|
+
|
12
|
+
|
13
|
+
### Chores
|
14
|
+
|
15
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([c1c4066](https://github.com/lumina-ai-inc/chunkr-python/commit/c1c406654d6117a0d43a6b7d11f4401cd70034ae))
|
16
|
+
* **internal:** update pydantic dependency ([aa2212f](https://github.com/lumina-ai-inc/chunkr-python/commit/aa2212f4de17a984d4a6819e795de9721696deed))
|
17
|
+
* **types:** change optional parameter type from NotGiven to Omit ([527f048](https://github.com/lumina-ai-inc/chunkr-python/commit/527f048233e9ae004d2837375f015dbb359f794e))
|
18
|
+
|
3
19
|
## 0.1.0-alpha.8 (2025-09-11)
|
4
20
|
|
5
21
|
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: chunkr-ai
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a9
|
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
|
@@ -92,9 +92,9 @@ pluggy==1.5.0
|
|
92
92
|
propcache==0.3.1
|
93
93
|
# via aiohttp
|
94
94
|
# via yarl
|
95
|
-
pydantic==2.
|
95
|
+
pydantic==2.11.9
|
96
96
|
# via chunkr-ai
|
97
|
-
pydantic-core==2.
|
97
|
+
pydantic-core==2.33.2
|
98
98
|
# via pydantic
|
99
99
|
pygments==2.18.0
|
100
100
|
# via rich
|
@@ -137,6 +137,9 @@ typing-extensions==4.12.2
|
|
137
137
|
# via pydantic
|
138
138
|
# via pydantic-core
|
139
139
|
# via pyright
|
140
|
+
# via typing-inspection
|
141
|
+
typing-inspection==0.4.1
|
142
|
+
# via pydantic
|
140
143
|
virtualenv==20.24.5
|
141
144
|
# via nox
|
142
145
|
wrapt==1.17.3
|
@@ -59,9 +59,9 @@ multidict==6.4.4
|
|
59
59
|
propcache==0.3.1
|
60
60
|
# via aiohttp
|
61
61
|
# via yarl
|
62
|
-
pydantic==2.
|
62
|
+
pydantic==2.11.9
|
63
63
|
# via chunkr-ai
|
64
|
-
pydantic-core==2.
|
64
|
+
pydantic-core==2.33.2
|
65
65
|
# via pydantic
|
66
66
|
python-dateutil==2.9.0.post0
|
67
67
|
# via standardwebhooks
|
@@ -82,6 +82,9 @@ typing-extensions==4.12.2
|
|
82
82
|
# via multidict
|
83
83
|
# via pydantic
|
84
84
|
# via pydantic-core
|
85
|
+
# via typing-inspection
|
86
|
+
typing-inspection==0.4.1
|
87
|
+
# via pydantic
|
85
88
|
wrapt==1.17.3
|
86
89
|
# via deprecated
|
87
90
|
yarl==1.20.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import typing as _t
|
4
4
|
|
5
5
|
from . import types
|
6
|
-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
6
|
+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
|
7
7
|
from ._utils import file_from_path
|
8
8
|
from ._client import Chunkr, Client, Stream, Timeout, Transport, AsyncChunkr, AsyncClient, AsyncStream, RequestOptions
|
9
9
|
from ._models import BaseModel
|
@@ -39,7 +39,9 @@ __all__ = [
|
|
39
39
|
"ProxiesTypes",
|
40
40
|
"NotGiven",
|
41
41
|
"NOT_GIVEN",
|
42
|
+
"not_given",
|
42
43
|
"Omit",
|
44
|
+
"omit",
|
43
45
|
"ChunkrError",
|
44
46
|
"APIError",
|
45
47
|
"APIStatusError",
|
@@ -42,7 +42,6 @@ from . import _exceptions
|
|
42
42
|
from ._qs import Querystring
|
43
43
|
from ._files import to_httpx_files, async_to_httpx_files
|
44
44
|
from ._types import (
|
45
|
-
NOT_GIVEN,
|
46
45
|
Body,
|
47
46
|
Omit,
|
48
47
|
Query,
|
@@ -57,6 +56,7 @@ from ._types import (
|
|
57
56
|
RequestOptions,
|
58
57
|
HttpxRequestFiles,
|
59
58
|
ModelBuilderProtocol,
|
59
|
+
not_given,
|
60
60
|
)
|
61
61
|
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
62
62
|
from ._compat import PYDANTIC_V1, model_copy, model_dump
|
@@ -145,9 +145,9 @@ class PageInfo:
|
|
145
145
|
def __init__(
|
146
146
|
self,
|
147
147
|
*,
|
148
|
-
url: URL | NotGiven =
|
149
|
-
json: Body | NotGiven =
|
150
|
-
params: Query | NotGiven =
|
148
|
+
url: URL | NotGiven = not_given,
|
149
|
+
json: Body | NotGiven = not_given,
|
150
|
+
params: Query | NotGiven = not_given,
|
151
151
|
) -> None:
|
152
152
|
self.url = url
|
153
153
|
self.json = json
|
@@ -595,7 +595,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
595
595
|
# we internally support defining a temporary header to override the
|
596
596
|
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
|
597
597
|
# see _response.py for implementation details
|
598
|
-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER,
|
598
|
+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
|
599
599
|
if is_given(override_cast_to):
|
600
600
|
options.headers = headers
|
601
601
|
return cast(Type[ResponseT], override_cast_to)
|
@@ -825,7 +825,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
825
825
|
version: str,
|
826
826
|
base_url: str | URL,
|
827
827
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
828
|
-
timeout: float | Timeout | None | NotGiven =
|
828
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
829
829
|
http_client: httpx.Client | None = None,
|
830
830
|
custom_headers: Mapping[str, str] | None = None,
|
831
831
|
custom_query: Mapping[str, object] | None = None,
|
@@ -1356,7 +1356,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1356
1356
|
base_url: str | URL,
|
1357
1357
|
_strict_response_validation: bool,
|
1358
1358
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
1359
|
-
timeout: float | Timeout | None | NotGiven =
|
1359
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
1360
1360
|
http_client: httpx.AsyncClient | None = None,
|
1361
1361
|
custom_headers: Mapping[str, str] | None = None,
|
1362
1362
|
custom_query: Mapping[str, object] | None = None,
|
@@ -1818,8 +1818,8 @@ def make_request_options(
|
|
1818
1818
|
extra_query: Query | None = None,
|
1819
1819
|
extra_body: Body | None = None,
|
1820
1820
|
idempotency_key: str | None = None,
|
1821
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
1822
|
-
post_parser: PostParser | NotGiven =
|
1821
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
1822
|
+
post_parser: PostParser | NotGiven = not_given,
|
1823
1823
|
) -> RequestOptions:
|
1824
1824
|
"""Create a dict of type RequestOptions without keys of NotGiven values."""
|
1825
1825
|
options: RequestOptions = {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
5
|
import os
|
6
|
-
from typing import Any,
|
6
|
+
from typing import Any, Mapping
|
7
7
|
from typing_extensions import Self, override
|
8
8
|
|
9
9
|
import httpx
|
@@ -11,13 +11,13 @@ import httpx
|
|
11
11
|
from . import _exceptions
|
12
12
|
from ._qs import Querystring
|
13
13
|
from ._types import (
|
14
|
-
NOT_GIVEN,
|
15
14
|
Omit,
|
16
15
|
Timeout,
|
17
16
|
NotGiven,
|
18
17
|
Transport,
|
19
18
|
ProxiesTypes,
|
20
19
|
RequestOptions,
|
20
|
+
not_given,
|
21
21
|
)
|
22
22
|
from ._utils import is_given, get_async_library
|
23
23
|
from ._version import __version__
|
@@ -52,7 +52,7 @@ class Chunkr(SyncAPIClient):
|
|
52
52
|
api_key: str | None = None,
|
53
53
|
webhook_key: str | None = None,
|
54
54
|
base_url: str | httpx.URL | None = None,
|
55
|
-
timeout:
|
55
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
56
56
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
57
57
|
default_headers: Mapping[str, str] | None = None,
|
58
58
|
default_query: Mapping[str, object] | None = None,
|
@@ -139,9 +139,9 @@ class Chunkr(SyncAPIClient):
|
|
139
139
|
api_key: str | None = None,
|
140
140
|
webhook_key: str | None = None,
|
141
141
|
base_url: str | httpx.URL | None = None,
|
142
|
-
timeout: float | Timeout | None | NotGiven =
|
142
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
143
143
|
http_client: httpx.Client | None = None,
|
144
|
-
max_retries: int | NotGiven =
|
144
|
+
max_retries: int | NotGiven = not_given,
|
145
145
|
default_headers: Mapping[str, str] | None = None,
|
146
146
|
set_default_headers: Mapping[str, str] | None = None,
|
147
147
|
default_query: Mapping[str, object] | None = None,
|
@@ -238,7 +238,7 @@ class AsyncChunkr(AsyncAPIClient):
|
|
238
238
|
api_key: str | None = None,
|
239
239
|
webhook_key: str | None = None,
|
240
240
|
base_url: str | httpx.URL | None = None,
|
241
|
-
timeout:
|
241
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
242
242
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
243
243
|
default_headers: Mapping[str, str] | None = None,
|
244
244
|
default_query: Mapping[str, object] | None = None,
|
@@ -325,9 +325,9 @@ class AsyncChunkr(AsyncAPIClient):
|
|
325
325
|
api_key: str | None = None,
|
326
326
|
webhook_key: str | None = None,
|
327
327
|
base_url: str | httpx.URL | None = None,
|
328
|
-
timeout: float | Timeout | None | NotGiven =
|
328
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
329
329
|
http_client: httpx.AsyncClient | None = None,
|
330
|
-
max_retries: int | NotGiven =
|
330
|
+
max_retries: int | NotGiven = not_given,
|
331
331
|
default_headers: Mapping[str, str] | None = None,
|
332
332
|
set_default_headers: Mapping[str, str] | None = None,
|
333
333
|
default_query: Mapping[str, object] | None = None,
|
@@ -256,7 +256,7 @@ class BaseModel(pydantic.BaseModel):
|
|
256
256
|
mode: Literal["json", "python"] | str = "python",
|
257
257
|
include: IncEx | None = None,
|
258
258
|
exclude: IncEx | None = None,
|
259
|
-
by_alias: bool =
|
259
|
+
by_alias: bool | None = None,
|
260
260
|
exclude_unset: bool = False,
|
261
261
|
exclude_defaults: bool = False,
|
262
262
|
exclude_none: bool = False,
|
@@ -264,6 +264,7 @@ class BaseModel(pydantic.BaseModel):
|
|
264
264
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
265
265
|
context: dict[str, Any] | None = None,
|
266
266
|
serialize_as_any: bool = False,
|
267
|
+
fallback: Callable[[Any], Any] | None = None,
|
267
268
|
) -> dict[str, Any]:
|
268
269
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
269
270
|
|
@@ -295,10 +296,12 @@ class BaseModel(pydantic.BaseModel):
|
|
295
296
|
raise ValueError("context is only supported in Pydantic v2")
|
296
297
|
if serialize_as_any != False:
|
297
298
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
299
|
+
if fallback is not None:
|
300
|
+
raise ValueError("fallback is only supported in Pydantic v2")
|
298
301
|
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
299
302
|
include=include,
|
300
303
|
exclude=exclude,
|
301
|
-
by_alias=by_alias,
|
304
|
+
by_alias=by_alias if by_alias is not None else False,
|
302
305
|
exclude_unset=exclude_unset,
|
303
306
|
exclude_defaults=exclude_defaults,
|
304
307
|
exclude_none=exclude_none,
|
@@ -313,13 +316,14 @@ class BaseModel(pydantic.BaseModel):
|
|
313
316
|
indent: int | None = None,
|
314
317
|
include: IncEx | None = None,
|
315
318
|
exclude: IncEx | None = None,
|
316
|
-
by_alias: bool =
|
319
|
+
by_alias: bool | None = None,
|
317
320
|
exclude_unset: bool = False,
|
318
321
|
exclude_defaults: bool = False,
|
319
322
|
exclude_none: bool = False,
|
320
323
|
round_trip: bool = False,
|
321
324
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
322
325
|
context: dict[str, Any] | None = None,
|
326
|
+
fallback: Callable[[Any], Any] | None = None,
|
323
327
|
serialize_as_any: bool = False,
|
324
328
|
) -> str:
|
325
329
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
|
@@ -348,11 +352,13 @@ class BaseModel(pydantic.BaseModel):
|
|
348
352
|
raise ValueError("context is only supported in Pydantic v2")
|
349
353
|
if serialize_as_any != False:
|
350
354
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
355
|
+
if fallback is not None:
|
356
|
+
raise ValueError("fallback is only supported in Pydantic v2")
|
351
357
|
return super().json( # type: ignore[reportDeprecated]
|
352
358
|
indent=indent,
|
353
359
|
include=include,
|
354
360
|
exclude=exclude,
|
355
|
-
by_alias=by_alias,
|
361
|
+
by_alias=by_alias if by_alias is not None else False,
|
356
362
|
exclude_unset=exclude_unset,
|
357
363
|
exclude_defaults=exclude_defaults,
|
358
364
|
exclude_none=exclude_none,
|
@@ -4,7 +4,7 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar
|
|
4
4
|
from urllib.parse import parse_qs, urlencode
|
5
5
|
from typing_extensions import Literal, get_args
|
6
6
|
|
7
|
-
from ._types import
|
7
|
+
from ._types import NotGiven, not_given
|
8
8
|
from ._utils import flatten
|
9
9
|
|
10
10
|
_T = TypeVar("_T")
|
@@ -41,8 +41,8 @@ class Querystring:
|
|
41
41
|
self,
|
42
42
|
params: Params,
|
43
43
|
*,
|
44
|
-
array_format:
|
45
|
-
nested_format:
|
44
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
45
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
46
46
|
) -> str:
|
47
47
|
return urlencode(
|
48
48
|
self.stringify_items(
|
@@ -56,8 +56,8 @@ class Querystring:
|
|
56
56
|
self,
|
57
57
|
params: Params,
|
58
58
|
*,
|
59
|
-
array_format:
|
60
|
-
nested_format:
|
59
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
60
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
61
61
|
) -> list[tuple[str, str]]:
|
62
62
|
opts = Options(
|
63
63
|
qs=self,
|
@@ -143,8 +143,8 @@ class Options:
|
|
143
143
|
self,
|
144
144
|
qs: Querystring = _qs,
|
145
145
|
*,
|
146
|
-
array_format:
|
147
|
-
nested_format:
|
146
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
147
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
148
148
|
) -> None:
|
149
149
|
self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format
|
150
150
|
self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format
|
@@ -117,18 +117,21 @@ class RequestOptions(TypedDict, total=False):
|
|
117
117
|
# Sentinel class used until PEP 0661 is accepted
|
118
118
|
class NotGiven:
|
119
119
|
"""
|
120
|
-
|
121
|
-
|
120
|
+
For parameters with a meaningful None value, we need to distinguish between
|
121
|
+
the user explicitly passing None, and the user not passing the parameter at
|
122
|
+
all.
|
123
|
+
|
124
|
+
User code shouldn't need to use not_given directly.
|
122
125
|
|
123
126
|
For example:
|
124
127
|
|
125
128
|
```py
|
126
|
-
def
|
129
|
+
def create(timeout: Timeout | None | NotGiven = not_given): ...
|
127
130
|
|
128
131
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
+
create(timeout=1) # 1s timeout
|
133
|
+
create(timeout=None) # No timeout
|
134
|
+
create() # Default timeout behavior
|
132
135
|
```
|
133
136
|
"""
|
134
137
|
|
@@ -140,13 +143,14 @@ class NotGiven:
|
|
140
143
|
return "NOT_GIVEN"
|
141
144
|
|
142
145
|
|
143
|
-
|
146
|
+
not_given = NotGiven()
|
147
|
+
# for backwards compatibility:
|
144
148
|
NOT_GIVEN = NotGiven()
|
145
149
|
|
146
150
|
|
147
151
|
class Omit:
|
148
|
-
"""
|
149
|
-
|
152
|
+
"""
|
153
|
+
To explicitly omit something from being sent in a request, use `omit`.
|
150
154
|
|
151
155
|
```py
|
152
156
|
# as the default `Content-Type` header is `application/json` that will be sent
|
@@ -156,8 +160,8 @@ class Omit:
|
|
156
160
|
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
|
157
161
|
client.post(..., headers={"Content-Type": "multipart/form-data"})
|
158
162
|
|
159
|
-
# instead you can remove the default `application/json` header by passing
|
160
|
-
client.post(..., headers={"Content-Type":
|
163
|
+
# instead you can remove the default `application/json` header by passing omit
|
164
|
+
client.post(..., headers={"Content-Type": omit})
|
161
165
|
```
|
162
166
|
"""
|
163
167
|
|
@@ -165,6 +169,9 @@ class Omit:
|
|
165
169
|
return False
|
166
170
|
|
167
171
|
|
172
|
+
omit = Omit()
|
173
|
+
|
174
|
+
|
168
175
|
@runtime_checkable
|
169
176
|
class ModelBuilderProtocol(Protocol):
|
170
177
|
@classmethod
|
@@ -268,7 +268,7 @@ def _transform_typeddict(
|
|
268
268
|
annotations = get_type_hints(expected_type, include_extras=True)
|
269
269
|
for key, value in data.items():
|
270
270
|
if not is_given(value):
|
271
|
-
# we don't need to include
|
271
|
+
# we don't need to include omitted values here as they'll
|
272
272
|
# be stripped out before the request is sent anyway
|
273
273
|
continue
|
274
274
|
|
@@ -434,7 +434,7 @@ async def _async_transform_typeddict(
|
|
434
434
|
annotations = get_type_hints(expected_type, include_extras=True)
|
435
435
|
for key, value in data.items():
|
436
436
|
if not is_given(value):
|
437
|
-
# we don't need to include
|
437
|
+
# we don't need to include omitted values here as they'll
|
438
438
|
# be stripped out before the request is sent anyway
|
439
439
|
continue
|
440
440
|
|
@@ -21,7 +21,7 @@ from typing_extensions import TypeGuard
|
|
21
21
|
|
22
22
|
import sniffio
|
23
23
|
|
24
|
-
from .._types import NotGiven, FileTypes,
|
24
|
+
from .._types import Omit, NotGiven, FileTypes, HeadersLike
|
25
25
|
|
26
26
|
_T = TypeVar("_T")
|
27
27
|
_TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
|
@@ -63,7 +63,7 @@ def _extract_items(
|
|
63
63
|
try:
|
64
64
|
key = path[index]
|
65
65
|
except IndexError:
|
66
|
-
if
|
66
|
+
if not is_given(obj):
|
67
67
|
# no value was provided - we can safely ignore
|
68
68
|
return []
|
69
69
|
|
@@ -126,8 +126,8 @@ def _extract_items(
|
|
126
126
|
return []
|
127
127
|
|
128
128
|
|
129
|
-
def is_given(obj:
|
130
|
-
return not isinstance(obj, NotGiven)
|
129
|
+
def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
|
130
|
+
return not isinstance(obj, NotGiven) and not isinstance(obj, Omit)
|
131
131
|
|
132
132
|
|
133
133
|
# Type safe methods for narrowing types with TypeVars.
|
@@ -9,7 +9,7 @@ from typing_extensions import Literal
|
|
9
9
|
import httpx
|
10
10
|
|
11
11
|
from ..types import file_url_params, file_list_params, file_create_params
|
12
|
-
from .._types import
|
12
|
+
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, omit, not_given
|
13
13
|
from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
14
14
|
from .._compat import cached_property
|
15
15
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
@@ -52,13 +52,13 @@ class FilesResource(SyncAPIResource):
|
|
52
52
|
self,
|
53
53
|
*,
|
54
54
|
file: FileTypes,
|
55
|
-
file_metadata: Optional[str] |
|
55
|
+
file_metadata: Optional[str] | Omit = omit,
|
56
56
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
57
57
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
58
58
|
extra_headers: Headers | None = None,
|
59
59
|
extra_query: Query | None = None,
|
60
60
|
extra_body: Body | None = None,
|
61
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
62
62
|
idempotency_key: str | None = None,
|
63
63
|
) -> File:
|
64
64
|
"""
|
@@ -110,17 +110,17 @@ class FilesResource(SyncAPIResource):
|
|
110
110
|
def list(
|
111
111
|
self,
|
112
112
|
*,
|
113
|
-
cursor: Union[str, datetime] |
|
114
|
-
end: Union[str, datetime] |
|
115
|
-
limit: int |
|
116
|
-
sort: Literal["asc", "desc"] |
|
117
|
-
start: Union[str, datetime] |
|
113
|
+
cursor: Union[str, datetime] | Omit = omit,
|
114
|
+
end: Union[str, datetime] | Omit = omit,
|
115
|
+
limit: int | Omit = omit,
|
116
|
+
sort: Literal["asc", "desc"] | Omit = omit,
|
117
|
+
start: Union[str, datetime] | Omit = omit,
|
118
118
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
119
119
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
120
120
|
extra_headers: Headers | None = None,
|
121
121
|
extra_query: Query | None = None,
|
122
122
|
extra_body: Body | None = None,
|
123
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
123
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
124
124
|
) -> SyncFilesPage[File]:
|
125
125
|
"""
|
126
126
|
Lists files for the authenticated user with cursor-based pagination and optional
|
@@ -176,7 +176,7 @@ class FilesResource(SyncAPIResource):
|
|
176
176
|
extra_headers: Headers | None = None,
|
177
177
|
extra_query: Query | None = None,
|
178
178
|
extra_body: Body | None = None,
|
179
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
179
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
180
180
|
idempotency_key: str | None = None,
|
181
181
|
) -> Delete:
|
182
182
|
"""Delete file contents and scrub sensitive metadata.
|
@@ -218,7 +218,7 @@ class FilesResource(SyncAPIResource):
|
|
218
218
|
extra_headers: Headers | None = None,
|
219
219
|
extra_query: Query | None = None,
|
220
220
|
extra_body: Body | None = None,
|
221
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
221
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
222
222
|
) -> None:
|
223
223
|
"""Streams the file bytes directly if authorized.
|
224
224
|
|
@@ -254,7 +254,7 @@ class FilesResource(SyncAPIResource):
|
|
254
254
|
extra_headers: Headers | None = None,
|
255
255
|
extra_query: Query | None = None,
|
256
256
|
extra_body: Body | None = None,
|
257
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
257
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
258
258
|
) -> File:
|
259
259
|
"""Returns metadata for a file owned by the authenticated user.
|
260
260
|
|
@@ -288,14 +288,14 @@ class FilesResource(SyncAPIResource):
|
|
288
288
|
self,
|
289
289
|
file_id: str,
|
290
290
|
*,
|
291
|
-
base64_urls: bool |
|
292
|
-
expires_in: int |
|
291
|
+
base64_urls: bool | Omit = omit,
|
292
|
+
expires_in: int | Omit = omit,
|
293
293
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
294
294
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
295
295
|
extra_headers: Headers | None = None,
|
296
296
|
extra_query: Query | None = None,
|
297
297
|
extra_body: Body | None = None,
|
298
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
298
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
299
299
|
) -> FileURL:
|
300
300
|
"""Returns a presigned download URL by default.
|
301
301
|
|
@@ -360,13 +360,13 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
360
360
|
self,
|
361
361
|
*,
|
362
362
|
file: FileTypes,
|
363
|
-
file_metadata: Optional[str] |
|
363
|
+
file_metadata: Optional[str] | Omit = omit,
|
364
364
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
365
365
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
366
366
|
extra_headers: Headers | None = None,
|
367
367
|
extra_query: Query | None = None,
|
368
368
|
extra_body: Body | None = None,
|
369
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
369
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
370
370
|
idempotency_key: str | None = None,
|
371
371
|
) -> File:
|
372
372
|
"""
|
@@ -418,17 +418,17 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
418
418
|
def list(
|
419
419
|
self,
|
420
420
|
*,
|
421
|
-
cursor: Union[str, datetime] |
|
422
|
-
end: Union[str, datetime] |
|
423
|
-
limit: int |
|
424
|
-
sort: Literal["asc", "desc"] |
|
425
|
-
start: Union[str, datetime] |
|
421
|
+
cursor: Union[str, datetime] | Omit = omit,
|
422
|
+
end: Union[str, datetime] | Omit = omit,
|
423
|
+
limit: int | Omit = omit,
|
424
|
+
sort: Literal["asc", "desc"] | Omit = omit,
|
425
|
+
start: Union[str, datetime] | Omit = omit,
|
426
426
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
427
427
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
428
428
|
extra_headers: Headers | None = None,
|
429
429
|
extra_query: Query | None = None,
|
430
430
|
extra_body: Body | None = None,
|
431
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
431
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
432
432
|
) -> AsyncPaginator[File, AsyncFilesPage[File]]:
|
433
433
|
"""
|
434
434
|
Lists files for the authenticated user with cursor-based pagination and optional
|
@@ -484,7 +484,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
484
484
|
extra_headers: Headers | None = None,
|
485
485
|
extra_query: Query | None = None,
|
486
486
|
extra_body: Body | None = None,
|
487
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
487
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
488
488
|
idempotency_key: str | None = None,
|
489
489
|
) -> Delete:
|
490
490
|
"""Delete file contents and scrub sensitive metadata.
|
@@ -526,7 +526,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
526
526
|
extra_headers: Headers | None = None,
|
527
527
|
extra_query: Query | None = None,
|
528
528
|
extra_body: Body | None = None,
|
529
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
529
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
530
530
|
) -> None:
|
531
531
|
"""Streams the file bytes directly if authorized.
|
532
532
|
|
@@ -562,7 +562,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
562
562
|
extra_headers: Headers | None = None,
|
563
563
|
extra_query: Query | None = None,
|
564
564
|
extra_body: Body | None = None,
|
565
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
565
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
566
566
|
) -> File:
|
567
567
|
"""Returns metadata for a file owned by the authenticated user.
|
568
568
|
|
@@ -596,14 +596,14 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
596
596
|
self,
|
597
597
|
file_id: str,
|
598
598
|
*,
|
599
|
-
base64_urls: bool |
|
600
|
-
expires_in: int |
|
599
|
+
base64_urls: bool | Omit = omit,
|
600
|
+
expires_in: int | Omit = omit,
|
601
601
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
602
602
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
603
603
|
extra_headers: Headers | None = None,
|
604
604
|
extra_query: Query | None = None,
|
605
605
|
extra_body: Body | None = None,
|
606
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
606
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
607
607
|
) -> FileURL:
|
608
608
|
"""Returns a presigned download URL by default.
|
609
609
|
|