chunkr-ai 0.1.0a7__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.
Files changed (132) hide show
  1. chunkr_ai-0.1.0a9/.release-please-manifest.json +3 -0
  2. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/CHANGELOG.md +33 -0
  3. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/PKG-INFO +1 -1
  4. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/pyproject.toml +53 -2
  5. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/requirements-dev.lock +5 -3
  6. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/requirements.lock +5 -2
  7. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/__init__.py +3 -1
  8. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_base_client.py +12 -12
  9. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_client.py +8 -8
  10. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_compat.py +48 -48
  11. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_models.py +50 -44
  12. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_qs.py +7 -7
  13. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_types.py +18 -11
  14. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/__init__.py +8 -2
  15. chunkr_ai-0.1.0a9/src/chunkr_ai/_utils/_compat.py +45 -0
  16. chunkr_ai-0.1.0a9/src/chunkr_ai/_utils/_datetime_parse.py +136 -0
  17. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_transform.py +13 -3
  18. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_typing.py +1 -1
  19. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_utils.py +4 -5
  20. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_version.py +1 -1
  21. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/files.py +29 -29
  22. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/health.py +3 -3
  23. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/extract.py +21 -37
  24. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/parse.py +29 -54
  25. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/tasks.py +35 -51
  26. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/webhooks.py +3 -3
  27. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/__init__.py +0 -2
  28. chunkr_ai-0.1.0a9/src/chunkr_ai/types/extract_output_response.py +62 -0
  29. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_info.py +3 -0
  30. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/ocr_result.py +6 -6
  31. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_configuration.py +0 -4
  32. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_configuration_param.py +0 -4
  33. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment.py +8 -5
  34. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment_processing.py +92 -2
  35. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/segment_processing_param.py +92 -2
  36. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_get_params.py +0 -3
  37. chunkr_ai-0.1.0a9/src/chunkr_ai/types/tasks/extract_create_response.py +67 -0
  38. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_get_params.py +0 -3
  39. chunkr_ai-0.1.0a9/src/chunkr_ai/types/tasks/extract_get_response.py +67 -0
  40. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_create_params.py +0 -4
  41. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_get_params.py +0 -3
  42. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/version_info.py +1 -1
  43. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/test_extract.py +74 -18
  44. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/test_parse.py +74 -18
  45. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/test_tasks.py +0 -2
  46. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_client.py +6 -47
  47. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_models.py +24 -24
  48. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_transform.py +17 -10
  49. chunkr_ai-0.1.0a9/tests/test_utils/test_datetime_parse.py +110 -0
  50. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/utils.py +4 -4
  51. chunkr_ai-0.1.0a7/.release-please-manifest.json +0 -3
  52. chunkr_ai-0.1.0a7/mypy.ini +0 -50
  53. chunkr_ai-0.1.0a7/src/chunkr_ai/types/extract_output_response.py +0 -19
  54. chunkr_ai-0.1.0a7/src/chunkr_ai/types/llm_processing.py +0 -36
  55. chunkr_ai-0.1.0a7/src/chunkr_ai/types/llm_processing_param.py +0 -36
  56. chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_create_response.py +0 -214
  57. chunkr_ai-0.1.0a7/src/chunkr_ai/types/tasks/extract_get_response.py +0 -214
  58. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/.gitignore +0 -0
  59. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/CONTRIBUTING.md +0 -0
  60. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/LICENSE +0 -0
  61. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/README.md +0 -0
  62. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/SECURITY.md +0 -0
  63. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/api.md +0 -0
  64. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/bin/check-release-environment +0 -0
  65. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/bin/publish-pypi +0 -0
  66. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/examples/.keep +0 -0
  67. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/noxfile.py +0 -0
  68. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/release-please-config.json +0 -0
  69. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr/lib/.keep +0 -0
  70. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_constants.py +0 -0
  71. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_exceptions.py +0 -0
  72. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_files.py +0 -0
  73. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_resource.py +0 -0
  74. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_response.py +0 -0
  75. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_streaming.py +0 -0
  76. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_logs.py +0 -0
  77. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_proxy.py +0 -0
  78. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_reflection.py +0 -0
  79. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_resources_proxy.py +0 -0
  80. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_streams.py +0 -0
  81. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/_utils/_sync.py +0 -0
  82. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/lib/.keep +0 -0
  83. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/pagination.py +0 -0
  84. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/py.typed +0 -0
  85. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/__init__.py +0 -0
  86. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/resources/tasks/__init__.py +0 -0
  87. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/bounding_box.py +0 -0
  88. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/cell.py +0 -0
  89. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/cell_style.py +0 -0
  90. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk.py +0 -0
  91. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk_processing.py +0 -0
  92. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/chunk_processing_param.py +0 -0
  93. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/delete.py +0 -0
  94. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/extract_configuration.py +0 -0
  95. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file.py +0 -0
  96. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_create_params.py +0 -0
  97. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_list_params.py +0 -0
  98. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_url.py +0 -0
  99. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/file_url_params.py +0 -0
  100. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/files_list_response.py +0 -0
  101. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/generation_config.py +0 -0
  102. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/generation_config_param.py +0 -0
  103. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/health_check_response.py +0 -0
  104. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/page.py +0 -0
  105. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/parse_output_response.py +0 -0
  106. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_extract_updated_webhook_event.py +0 -0
  107. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_list_params.py +0 -0
  108. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_parse_updated_webhook_event.py +0 -0
  109. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/task_response.py +0 -0
  110. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/__init__.py +0 -0
  111. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/extract_create_params.py +0 -0
  112. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_create_response.py +0 -0
  113. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/tasks/parse_get_response.py +0 -0
  114. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/unwrap_webhook_event.py +0 -0
  115. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/src/chunkr_ai/types/webhook_url_response.py +0 -0
  116. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/__init__.py +0 -0
  117. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/__init__.py +0 -0
  118. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/tasks/__init__.py +0 -0
  119. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/test_files.py +0 -0
  120. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/test_health.py +0 -0
  121. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/api_resources/test_webhooks.py +0 -0
  122. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/conftest.py +0 -0
  123. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/sample_file.txt +0 -0
  124. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_deepcopy.py +0 -0
  125. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_extract_files.py +0 -0
  126. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_files.py +0 -0
  127. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_qs.py +0 -0
  128. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_required_args.py +0 -0
  129. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_response.py +0 -0
  130. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_streaming.py +0 -0
  131. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_utils/test_proxy.py +0 -0
  132. {chunkr_ai-0.1.0a7 → chunkr_ai-0.1.0a9}/tests/test_utils/test_typing.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.9"
3
+ }
@@ -1,5 +1,38 @@
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
+
19
+ ## 0.1.0-alpha.8 (2025-09-11)
20
+
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)
22
+
23
+ ### Features
24
+
25
+ * **api:** api update ([23f3de3](https://github.com/lumina-ai-inc/chunkr-python/commit/23f3de313292081cacc5fc4bbc3f2a2399ef79f9))
26
+ * **api:** api update ([0686c97](https://github.com/lumina-ai-inc/chunkr-python/commit/0686c97a2351bd6e0f707a4660a16b06fbcebe40))
27
+ * improve future compat with pydantic v3 ([5025ab8](https://github.com/lumina-ai-inc/chunkr-python/commit/5025ab8dca9a962a31605361eb79f3ac11ae54d3))
28
+ * **types:** replace List[str] with SequenceNotStr in params ([6f6976a](https://github.com/lumina-ai-inc/chunkr-python/commit/6f6976a9c6f76ea1848ba59e3bd64e8d58e2b387))
29
+
30
+
31
+ ### Chores
32
+
33
+ * **internal:** move mypy configurations to `pyproject.toml` file ([1da3fbc](https://github.com/lumina-ai-inc/chunkr-python/commit/1da3fbc670714966deaedf799cc830fb78f7e8d4))
34
+ * **tests:** simplify `get_platform` test ([6b426b4](https://github.com/lumina-ai-inc/chunkr-python/commit/6b426b41598ec9e7d62901fcd7fe6e5b9ee83172))
35
+
3
36
  ## 0.1.0-alpha.7 (2025-09-01)
4
37
 
5
38
  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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chunkr-ai
3
- Version: 0.1.0a7
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chunkr-ai"
3
- version = "0.1.0-alpha.7"
3
+ version = "0.1.0-alpha.9"
4
4
  description = "The official Python library for the chunkr API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -57,7 +57,6 @@ dev-dependencies = [
57
57
  "dirty-equals>=0.6.0",
58
58
  "importlib-metadata>=6.7.0",
59
59
  "rich>=13.7.1",
60
- "nest_asyncio==1.6.0",
61
60
  "pytest-xdist>=3.6.1",
62
61
  ]
63
62
 
@@ -158,6 +157,58 @@ reportOverlappingOverload = false
158
157
  reportImportCycles = false
159
158
  reportPrivateUsage = false
160
159
 
160
+ [tool.mypy]
161
+ pretty = true
162
+ show_error_codes = true
163
+
164
+ # Exclude _files.py because mypy isn't smart enough to apply
165
+ # the correct type narrowing and as this is an internal module
166
+ # it's fine to just use Pyright.
167
+ #
168
+ # We also exclude our `tests` as mypy doesn't always infer
169
+ # types correctly and Pyright will still catch any type errors.
170
+ exclude = ['src/chunkr_ai/_files.py', '_dev/.*.py', 'tests/.*']
171
+
172
+ strict_equality = true
173
+ implicit_reexport = true
174
+ check_untyped_defs = true
175
+ no_implicit_optional = true
176
+
177
+ warn_return_any = true
178
+ warn_unreachable = true
179
+ warn_unused_configs = true
180
+
181
+ # Turn these options off as it could cause conflicts
182
+ # with the Pyright options.
183
+ warn_unused_ignores = false
184
+ warn_redundant_casts = false
185
+
186
+ disallow_any_generics = true
187
+ disallow_untyped_defs = true
188
+ disallow_untyped_calls = true
189
+ disallow_subclassing_any = true
190
+ disallow_incomplete_defs = true
191
+ disallow_untyped_decorators = true
192
+ cache_fine_grained = true
193
+
194
+ # By default, mypy reports an error if you assign a value to the result
195
+ # of a function call that doesn't return anything. We do this in our test
196
+ # cases:
197
+ # ```
198
+ # result = ...
199
+ # assert result is None
200
+ # ```
201
+ # Changing this codegen to make mypy happy would increase complexity
202
+ # and would not be worth it.
203
+ disable_error_code = "func-returns-value,overload-cannot-match"
204
+
205
+ # https://github.com/python/mypy/issues/12162
206
+ [[tool.mypy.overrides]]
207
+ module = "black.files.*"
208
+ ignore_errors = true
209
+ ignore_missing_imports = true
210
+
211
+
161
212
  [tool.ruff]
162
213
  line-length = 120
163
214
  output-format = "grouped"
@@ -79,7 +79,6 @@ multidict==6.4.4
79
79
  mypy==1.14.1
80
80
  mypy-extensions==1.0.0
81
81
  # via mypy
82
- nest-asyncio==1.6.0
83
82
  nodeenv==1.8.0
84
83
  # via pyright
85
84
  nox==2023.4.22
@@ -93,9 +92,9 @@ pluggy==1.5.0
93
92
  propcache==0.3.1
94
93
  # via aiohttp
95
94
  # via yarl
96
- pydantic==2.10.3
95
+ pydantic==2.11.9
97
96
  # via chunkr-ai
98
- pydantic-core==2.27.1
97
+ pydantic-core==2.33.2
99
98
  # via pydantic
100
99
  pygments==2.18.0
101
100
  # via rich
@@ -138,6 +137,9 @@ typing-extensions==4.12.2
138
137
  # via pydantic
139
138
  # via pydantic-core
140
139
  # via pyright
140
+ # via typing-inspection
141
+ typing-inspection==0.4.1
142
+ # via pydantic
141
143
  virtualenv==20.24.5
142
144
  # via nox
143
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.10.3
62
+ pydantic==2.11.9
63
63
  # via chunkr-ai
64
- pydantic-core==2.27.1
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,9 +56,10 @@ 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
- from ._compat import PYDANTIC_V2, model_copy, model_dump
62
+ from ._compat import PYDANTIC_V1, model_copy, model_dump
63
63
  from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
64
64
  from ._response import (
65
65
  APIResponse,
@@ -145,9 +145,9 @@ class PageInfo:
145
145
  def __init__(
146
146
  self,
147
147
  *,
148
- url: URL | NotGiven = NOT_GIVEN,
149
- json: Body | NotGiven = NOT_GIVEN,
150
- params: Query | NotGiven = NOT_GIVEN,
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
@@ -232,7 +232,7 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
232
232
  model: Type[_T],
233
233
  options: FinalRequestOptions,
234
234
  ) -> None:
235
- if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
235
+ if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
236
236
  self.__pydantic_private__ = {}
237
237
 
238
238
  self._model = model
@@ -320,7 +320,7 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
320
320
  client: AsyncAPIClient,
321
321
  options: FinalRequestOptions,
322
322
  ) -> None:
323
- if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
323
+ if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
324
324
  self.__pydantic_private__ = {}
325
325
 
326
326
  self._model = model
@@ -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, NOT_GIVEN)
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 = NOT_GIVEN,
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 = NOT_GIVEN,
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 = NOT_GIVEN,
1822
- post_parser: PostParser | NotGiven = NOT_GIVEN,
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, Union, Mapping
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: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
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 = NOT_GIVEN,
142
+ timeout: float | Timeout | None | NotGiven = not_given,
143
143
  http_client: httpx.Client | None = None,
144
- max_retries: int | NotGiven = NOT_GIVEN,
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: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
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 = NOT_GIVEN,
328
+ timeout: float | Timeout | None | NotGiven = not_given,
329
329
  http_client: httpx.AsyncClient | None = None,
330
- max_retries: int | NotGiven = NOT_GIVEN,
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,
@@ -12,14 +12,13 @@ from ._types import IncEx, StrBytesIntFloat
12
12
  _T = TypeVar("_T")
13
13
  _ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel)
14
14
 
15
- # --------------- Pydantic v2 compatibility ---------------
15
+ # --------------- Pydantic v2, v3 compatibility ---------------
16
16
 
17
17
  # Pyright incorrectly reports some of our functions as overriding a method when they don't
18
18
  # pyright: reportIncompatibleMethodOverride=false
19
19
 
20
- PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
20
+ PYDANTIC_V1 = pydantic.VERSION.startswith("1.")
21
21
 
22
- # v1 re-exports
23
22
  if TYPE_CHECKING:
24
23
 
25
24
  def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001
@@ -44,90 +43,92 @@ if TYPE_CHECKING:
44
43
  ...
45
44
 
46
45
  else:
47
- if PYDANTIC_V2:
48
- from pydantic.v1.typing import (
46
+ # v1 re-exports
47
+ if PYDANTIC_V1:
48
+ from pydantic.typing import (
49
49
  get_args as get_args,
50
50
  is_union as is_union,
51
51
  get_origin as get_origin,
52
52
  is_typeddict as is_typeddict,
53
53
  is_literal_type as is_literal_type,
54
54
  )
55
- from pydantic.v1.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
55
+ from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
56
56
  else:
57
- from pydantic.typing import (
57
+ from ._utils import (
58
58
  get_args as get_args,
59
59
  is_union as is_union,
60
60
  get_origin as get_origin,
61
+ parse_date as parse_date,
61
62
  is_typeddict as is_typeddict,
63
+ parse_datetime as parse_datetime,
62
64
  is_literal_type as is_literal_type,
63
65
  )
64
- from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
65
66
 
66
67
 
67
68
  # refactored config
68
69
  if TYPE_CHECKING:
69
70
  from pydantic import ConfigDict as ConfigDict
70
71
  else:
71
- if PYDANTIC_V2:
72
- from pydantic import ConfigDict
73
- else:
72
+ if PYDANTIC_V1:
74
73
  # TODO: provide an error message here?
75
74
  ConfigDict = None
75
+ else:
76
+ from pydantic import ConfigDict as ConfigDict
76
77
 
77
78
 
78
79
  # renamed methods / properties
79
80
  def parse_obj(model: type[_ModelT], value: object) -> _ModelT:
80
- if PYDANTIC_V2:
81
- return model.model_validate(value)
82
- else:
81
+ if PYDANTIC_V1:
83
82
  return cast(_ModelT, model.parse_obj(value)) # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
83
+ else:
84
+ return model.model_validate(value)
84
85
 
85
86
 
86
87
  def field_is_required(field: FieldInfo) -> bool:
87
- if PYDANTIC_V2:
88
- return field.is_required()
89
- return field.required # type: ignore
88
+ if PYDANTIC_V1:
89
+ return field.required # type: ignore
90
+ return field.is_required()
90
91
 
91
92
 
92
93
  def field_get_default(field: FieldInfo) -> Any:
93
94
  value = field.get_default()
94
- if PYDANTIC_V2:
95
- from pydantic_core import PydanticUndefined
96
-
97
- if value == PydanticUndefined:
98
- return None
95
+ if PYDANTIC_V1:
99
96
  return value
97
+ from pydantic_core import PydanticUndefined
98
+
99
+ if value == PydanticUndefined:
100
+ return None
100
101
  return value
101
102
 
102
103
 
103
104
  def field_outer_type(field: FieldInfo) -> Any:
104
- if PYDANTIC_V2:
105
- return field.annotation
106
- return field.outer_type_ # type: ignore
105
+ if PYDANTIC_V1:
106
+ return field.outer_type_ # type: ignore
107
+ return field.annotation
107
108
 
108
109
 
109
110
  def get_model_config(model: type[pydantic.BaseModel]) -> Any:
110
- if PYDANTIC_V2:
111
- return model.model_config
112
- return model.__config__ # type: ignore
111
+ if PYDANTIC_V1:
112
+ return model.__config__ # type: ignore
113
+ return model.model_config
113
114
 
114
115
 
115
116
  def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:
116
- if PYDANTIC_V2:
117
- return model.model_fields
118
- return model.__fields__ # type: ignore
117
+ if PYDANTIC_V1:
118
+ return model.__fields__ # type: ignore
119
+ return model.model_fields
119
120
 
120
121
 
121
122
  def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:
122
- if PYDANTIC_V2:
123
- return model.model_copy(deep=deep)
124
- return model.copy(deep=deep) # type: ignore
123
+ if PYDANTIC_V1:
124
+ return model.copy(deep=deep) # type: ignore
125
+ return model.model_copy(deep=deep)
125
126
 
126
127
 
127
128
  def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
128
- if PYDANTIC_V2:
129
- return model.model_dump_json(indent=indent)
130
- return model.json(indent=indent) # type: ignore
129
+ if PYDANTIC_V1:
130
+ return model.json(indent=indent) # type: ignore
131
+ return model.model_dump_json(indent=indent)
131
132
 
132
133
 
133
134
  def model_dump(
@@ -139,14 +140,14 @@ def model_dump(
139
140
  warnings: bool = True,
140
141
  mode: Literal["json", "python"] = "python",
141
142
  ) -> dict[str, Any]:
142
- if PYDANTIC_V2 or hasattr(model, "model_dump"):
143
+ if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
143
144
  return model.model_dump(
144
145
  mode=mode,
145
146
  exclude=exclude,
146
147
  exclude_unset=exclude_unset,
147
148
  exclude_defaults=exclude_defaults,
148
149
  # warnings are not supported in Pydantic v1
149
- warnings=warnings if PYDANTIC_V2 else True,
150
+ warnings=True if PYDANTIC_V1 else warnings,
150
151
  )
151
152
  return cast(
152
153
  "dict[str, Any]",
@@ -159,9 +160,9 @@ def model_dump(
159
160
 
160
161
 
161
162
  def model_parse(model: type[_ModelT], data: Any) -> _ModelT:
162
- if PYDANTIC_V2:
163
- return model.model_validate(data)
164
- return model.parse_obj(data) # pyright: ignore[reportDeprecated]
163
+ if PYDANTIC_V1:
164
+ return model.parse_obj(data) # pyright: ignore[reportDeprecated]
165
+ return model.model_validate(data)
165
166
 
166
167
 
167
168
  # generic models
@@ -170,17 +171,16 @@ if TYPE_CHECKING:
170
171
  class GenericModel(pydantic.BaseModel): ...
171
172
 
172
173
  else:
173
- if PYDANTIC_V2:
174
+ if PYDANTIC_V1:
175
+ import pydantic.generics
176
+
177
+ class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ...
178
+ else:
174
179
  # there no longer needs to be a distinction in v2 but
175
180
  # we still have to create our own subclass to avoid
176
181
  # inconsistent MRO ordering errors
177
182
  class GenericModel(pydantic.BaseModel): ...
178
183
 
179
- else:
180
- import pydantic.generics
181
-
182
- class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ...
183
-
184
184
 
185
185
  # cached properties
186
186
  if TYPE_CHECKING: