mixedbread 0.48.0__tar.gz → 0.50.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. {mixedbread-0.48.0 → mixedbread-0.50.0}/.gitignore +1 -0
  2. mixedbread-0.50.0/.release-please-manifest.json +3 -0
  3. {mixedbread-0.48.0 → mixedbread-0.50.0}/CHANGELOG.md +53 -0
  4. {mixedbread-0.48.0 → mixedbread-0.50.0}/CONTRIBUTING.md +1 -1
  5. {mixedbread-0.48.0 → mixedbread-0.50.0}/PKG-INFO +1 -1
  6. {mixedbread-0.48.0 → mixedbread-0.50.0}/api.md +29 -6
  7. {mixedbread-0.48.0 → mixedbread-0.50.0}/pyproject.toml +1 -1
  8. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_base_client.py +4 -0
  9. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_files.py +53 -3
  10. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_qs.py +4 -1
  11. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/__init__.py +1 -1
  12. mixedbread-0.50.0/src/mixedbread/_utils/_path.py +127 -0
  13. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_utils.py +3 -17
  14. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_version.py +1 -1
  15. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/api_keys.py +12 -11
  16. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/data_sources/connectors.py +35 -11
  17. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/data_sources/data_sources.py +7 -7
  18. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/extractions/jobs.py +3 -3
  19. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/files/files.py +14 -13
  20. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/files/uploads.py +7 -7
  21. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/parsing/jobs.py +7 -7
  22. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/stores/files.py +41 -160
  23. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/stores/stores.py +36 -9
  24. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/__init__.py +22 -0
  25. mixedbread-0.50.0/src/mixedbread/types/agentic_search_config_param.py +24 -0
  26. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/api_key.py +2 -9
  27. mixedbread-0.50.0/src/mixedbread/types/api_key_create_or_update_params.py +16 -0
  28. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/api_key_create_params.py +4 -11
  29. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/api_key_created.py +2 -9
  30. mixedbread-0.50.0/src/mixedbread/types/audio_chunk_generated_metadata.py +42 -0
  31. mixedbread-0.50.0/src/mixedbread/types/audio_url.py +12 -0
  32. mixedbread-0.50.0/src/mixedbread/types/code_chunk_generated_metadata.py +40 -0
  33. mixedbread-0.50.0/src/mixedbread/types/contextualization_config.py +24 -0
  34. mixedbread-0.50.0/src/mixedbread/types/contextualization_config_param.py +27 -0
  35. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source.py +3 -12
  36. mixedbread-0.50.0/src/mixedbread/types/data_source_api_key_params.py +17 -0
  37. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_create_params.py +3 -17
  38. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_update_params.py +3 -17
  39. mixedbread-0.50.0/src/mixedbread/types/file_counts.py +29 -0
  40. mixedbread-0.50.0/src/mixedbread/types/image_chunk_generated_metadata.py +36 -0
  41. mixedbread-0.50.0/src/mixedbread/types/image_url_output.py +17 -0
  42. mixedbread-0.50.0/src/mixedbread/types/markdown_chunk_generated_metadata.py +47 -0
  43. mixedbread-0.50.0/src/mixedbread/types/markdown_heading.py +11 -0
  44. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/notion_data_source_param.py +3 -12
  45. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/__init__.py +3 -0
  46. mixedbread-0.50.0/src/mixedbread/types/parsing/chunk.py +21 -0
  47. mixedbread-0.50.0/src/mixedbread/types/parsing/chunk_element.py +33 -0
  48. mixedbread-0.50.0/src/mixedbread/types/parsing/document_parser_result.py +30 -0
  49. mixedbread-0.50.0/src/mixedbread/types/parsing/parsing_job.py +48 -0
  50. mixedbread-0.50.0/src/mixedbread/types/pdf_chunk_generated_metadata.py +34 -0
  51. mixedbread-0.50.0/src/mixedbread/types/rerank_config_param.py +26 -0
  52. mixedbread-0.50.0/src/mixedbread/types/scope.py +16 -0
  53. mixedbread-0.50.0/src/mixedbread/types/scope_param.py +16 -0
  54. mixedbread-0.50.0/src/mixedbread/types/scored_audio_url_input_chunk.py +75 -0
  55. mixedbread-0.50.0/src/mixedbread/types/scored_image_url_input_chunk.py +75 -0
  56. mixedbread-0.50.0/src/mixedbread/types/scored_text_input_chunk.py +74 -0
  57. mixedbread-0.50.0/src/mixedbread/types/scored_video_url_input_chunk.py +75 -0
  58. mixedbread-0.50.0/src/mixedbread/types/store.py +67 -0
  59. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_chunk_search_options_param.py +5 -32
  60. mixedbread-0.50.0/src/mixedbread/types/store_config.py +26 -0
  61. mixedbread-0.50.0/src/mixedbread/types/store_config_param.py +27 -0
  62. mixedbread-0.50.0/src/mixedbread/types/store_create_params.py +41 -0
  63. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_question_answering_params.py +6 -0
  64. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_update_params.py +3 -0
  65. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/__init__.py +6 -3
  66. mixedbread-0.50.0/src/mixedbread/types/stores/audio_url_input_chunk.py +57 -0
  67. mixedbread-0.50.0/src/mixedbread/types/stores/file_create_params.py +30 -0
  68. mixedbread-0.50.0/src/mixedbread/types/stores/image_url_input_chunk.py +57 -0
  69. mixedbread-0.48.0/src/mixedbread/types/stores/scored_store_file.py → mixedbread-0.50.0/src/mixedbread/types/stores/store_file.py +13 -20
  70. mixedbread-0.50.0/src/mixedbread/types/stores/store_file_config.py +15 -0
  71. mixedbread-0.50.0/src/mixedbread/types/stores/store_file_config_param.py +14 -0
  72. mixedbread-0.50.0/src/mixedbread/types/stores/text_input_chunk.py +56 -0
  73. mixedbread-0.50.0/src/mixedbread/types/stores/video_url_input_chunk.py +57 -0
  74. mixedbread-0.50.0/src/mixedbread/types/text_chunk_generated_metadata.py +40 -0
  75. mixedbread-0.50.0/src/mixedbread/types/video_chunk_generated_metadata.py +46 -0
  76. mixedbread-0.50.0/src/mixedbread/types/video_url.py +12 -0
  77. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/stores/test_files.py +0 -119
  78. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_stores.py +6 -0
  79. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_client.py +48 -0
  80. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_extract_files.py +9 -0
  81. mixedbread-0.50.0/tests/test_files.py +148 -0
  82. mixedbread-0.50.0/tests/test_utils/test_path.py +89 -0
  83. mixedbread-0.48.0/.release-please-manifest.json +0 -3
  84. mixedbread-0.48.0/src/mixedbread/types/parsing/parsing_job.py +0 -107
  85. mixedbread-0.48.0/src/mixedbread/types/scored_audio_url_input_chunk.py +0 -319
  86. mixedbread-0.48.0/src/mixedbread/types/scored_image_url_input_chunk.py +0 -319
  87. mixedbread-0.48.0/src/mixedbread/types/scored_text_input_chunk.py +0 -305
  88. mixedbread-0.48.0/src/mixedbread/types/scored_video_url_input_chunk.py +0 -316
  89. mixedbread-0.48.0/src/mixedbread/types/store.py +0 -112
  90. mixedbread-0.48.0/src/mixedbread/types/store_create_params.py +0 -65
  91. mixedbread-0.48.0/src/mixedbread/types/stores/file_create_params.py +0 -42
  92. mixedbread-0.48.0/src/mixedbread/types/stores/file_search_params.py +0 -122
  93. mixedbread-0.48.0/src/mixedbread/types/stores/file_search_response.py +0 -17
  94. mixedbread-0.48.0/src/mixedbread/types/stores/store_file.py +0 -1231
  95. mixedbread-0.48.0/tests/test_deepcopy.py +0 -58
  96. mixedbread-0.48.0/tests/test_files.py +0 -51
  97. {mixedbread-0.48.0 → mixedbread-0.50.0}/LICENSE +0 -0
  98. {mixedbread-0.48.0 → mixedbread-0.50.0}/README.md +0 -0
  99. {mixedbread-0.48.0 → mixedbread-0.50.0}/SECURITY.md +0 -0
  100. {mixedbread-0.48.0 → mixedbread-0.50.0}/bin/check-release-environment +0 -0
  101. {mixedbread-0.48.0 → mixedbread-0.50.0}/bin/publish-pypi +0 -0
  102. {mixedbread-0.48.0 → mixedbread-0.50.0}/examples/.keep +0 -0
  103. {mixedbread-0.48.0 → mixedbread-0.50.0}/noxfile.py +0 -0
  104. {mixedbread-0.48.0 → mixedbread-0.50.0}/release-please-config.json +0 -0
  105. {mixedbread-0.48.0 → mixedbread-0.50.0}/requirements-dev.lock +0 -0
  106. {mixedbread-0.48.0 → mixedbread-0.50.0}/requirements.lock +0 -0
  107. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/__init__.py +0 -0
  108. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_client.py +0 -0
  109. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_compat.py +0 -0
  110. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_constants.py +0 -0
  111. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_exceptions.py +0 -0
  112. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_models.py +0 -0
  113. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_resource.py +0 -0
  114. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_response.py +0 -0
  115. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_streaming.py +0 -0
  116. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_types.py +0 -0
  117. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_compat.py +0 -0
  118. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_datetime_parse.py +0 -0
  119. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_json.py +0 -0
  120. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_logs.py +0 -0
  121. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_proxy.py +0 -0
  122. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_reflection.py +0 -0
  123. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_resources_proxy.py +0 -0
  124. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_streams.py +0 -0
  125. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_sync.py +0 -0
  126. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_transform.py +0 -0
  127. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/_utils/_typing.py +0 -0
  128. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/lib/.keep +0 -0
  129. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/lib/__init__.py +0 -0
  130. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/lib/multipart_upload.py +0 -0
  131. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/lib/polling.py +0 -0
  132. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/pagination.py +0 -0
  133. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/py.typed +0 -0
  134. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/__init__.py +0 -0
  135. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/chat.py +0 -0
  136. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/data_sources/__init__.py +0 -0
  137. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/embeddings.py +0 -0
  138. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/extractions/__init__.py +0 -0
  139. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/extractions/content.py +0 -0
  140. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/extractions/extractions.py +0 -0
  141. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/extractions/schema.py +0 -0
  142. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/files/__init__.py +0 -0
  143. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/parsing/__init__.py +0 -0
  144. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/parsing/parsing.py +0 -0
  145. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/resources/stores/__init__.py +0 -0
  146. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/api_key_delete_response.py +0 -0
  147. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/api_key_list_params.py +0 -0
  148. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/client_embed_params.py +0 -0
  149. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/client_rerank_params.py +0 -0
  150. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_delete_response.py +0 -0
  151. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_list_params.py +0 -0
  152. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_oauth2_params.py +0 -0
  153. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_source_type.py +0 -0
  154. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/__init__.py +0 -0
  155. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/connector_create_params.py +0 -0
  156. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/connector_delete_response.py +0 -0
  157. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/connector_list_params.py +0 -0
  158. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/connector_update_params.py +0 -0
  159. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/data_sources/data_source_connector.py +0 -0
  160. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/embedding.py +0 -0
  161. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/embedding_create_params.py +0 -0
  162. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/embedding_create_response.py +0 -0
  163. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/encoding_format.py +0 -0
  164. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/expires_after.py +0 -0
  165. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/expires_after_param.py +0 -0
  166. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/__init__.py +0 -0
  167. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/content_create_params.py +0 -0
  168. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/created_json_schema.py +0 -0
  169. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/enhanced_json_schema.py +0 -0
  170. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/extraction_job.py +0 -0
  171. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/extraction_result.py +0 -0
  172. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/image_url_input_param.py +0 -0
  173. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/job_create_params.py +0 -0
  174. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/schema_create_params.py +0 -0
  175. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/schema_enhance_params.py +0 -0
  176. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/schema_validate_params.py +0 -0
  177. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/text_input_param.py +0 -0
  178. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/extractions/validated_json_schema.py +0 -0
  179. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/file_create_params.py +0 -0
  180. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/file_delete_response.py +0 -0
  181. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/file_list_params.py +0 -0
  182. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/file_object.py +0 -0
  183. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/file_update_params.py +0 -0
  184. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/__init__.py +0 -0
  185. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/multipart_upload_part.py +0 -0
  186. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/multipart_upload_part_param.py +0 -0
  187. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/multipart_upload_part_url.py +0 -0
  188. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_abort_response.py +0 -0
  189. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_complete_params.py +0 -0
  190. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_create_params.py +0 -0
  191. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_create_response.py +0 -0
  192. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_list_response.py +0 -0
  193. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/files/upload_retrieve_response.py +0 -0
  194. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/info_response.py +0 -0
  195. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/linear_data_source_param.py +0 -0
  196. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/multi_encoding_embedding.py +0 -0
  197. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/oauth2_params.py +0 -0
  198. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/pagination_with_total.py +0 -0
  199. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/chunking_strategy.py +0 -0
  200. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/element_type.py +0 -0
  201. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/job_create_params.py +0 -0
  202. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/job_delete_response.py +0 -0
  203. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/job_list_params.py +0 -0
  204. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/job_list_response.py +0 -0
  205. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/parsing_job_status.py +0 -0
  206. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/parsing/return_format.py +0 -0
  207. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/rerank_response.py +0 -0
  208. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared/__init__.py +0 -0
  209. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared/search_filter.py +0 -0
  210. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared/search_filter_condition.py +0 -0
  211. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared/usage.py +0 -0
  212. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared_params/__init__.py +0 -0
  213. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared_params/search_filter.py +0 -0
  214. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/shared_params/search_filter_condition.py +0 -0
  215. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_delete_response.py +0 -0
  216. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_list_params.py +0 -0
  217. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_metadata_facets_params.py +0 -0
  218. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_metadata_facets_response.py +0 -0
  219. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_question_answering_response.py +0 -0
  220. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_search_params.py +0 -0
  221. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/store_search_response.py +0 -0
  222. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/file_delete_response.py +0 -0
  223. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/file_list_params.py +0 -0
  224. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/file_list_response.py +0 -0
  225. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/file_retrieve_params.py +0 -0
  226. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/file_update_params.py +0 -0
  227. {mixedbread-0.48.0 → mixedbread-0.50.0}/src/mixedbread/types/stores/store_file_status.py +0 -0
  228. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/__init__.py +0 -0
  229. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/__init__.py +0 -0
  230. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/data_sources/__init__.py +0 -0
  231. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/data_sources/test_connectors.py +0 -0
  232. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/extractions/__init__.py +0 -0
  233. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/extractions/test_content.py +0 -0
  234. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/extractions/test_jobs.py +0 -0
  235. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/extractions/test_schema.py +0 -0
  236. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/files/__init__.py +0 -0
  237. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/files/test_uploads.py +0 -0
  238. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/parsing/__init__.py +0 -0
  239. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/parsing/test_jobs.py +0 -0
  240. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/stores/__init__.py +0 -0
  241. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_api_keys.py +0 -0
  242. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_chat.py +0 -0
  243. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_client.py +0 -0
  244. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_data_sources.py +0 -0
  245. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_embeddings.py +0 -0
  246. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/api_resources/test_files.py +0 -0
  247. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/conftest.py +0 -0
  248. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/sample_file.txt +0 -0
  249. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_models.py +0 -0
  250. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_qs.py +0 -0
  251. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_required_args.py +0 -0
  252. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_response.py +0 -0
  253. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_streaming.py +0 -0
  254. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_transform.py +0 -0
  255. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_utils/test_datetime_parse.py +0 -0
  256. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_utils/test_json.py +0 -0
  257. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_utils/test_proxy.py +0 -0
  258. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/test_utils/test_typing.py +0 -0
  259. {mixedbread-0.48.0 → mixedbread-0.50.0}/tests/utils.py +0 -0
@@ -1,4 +1,5 @@
1
1
  .prism.log
2
+ .stdy.log
2
3
  _dev
3
4
 
4
5
  __pycache__
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.50.0"
3
+ }
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.50.0 (2026-04-23)
4
+
5
+ Full Changelog: [v0.49.0...v0.50.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.49.0...v0.50.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([9cb94bc](https://github.com/mixedbread-ai/mixedbread-python/commit/9cb94bcfc4cf74adfd82b1ff6e8166d5bf597bf7))
10
+ * **api:** api update ([c7f1a92](https://github.com/mixedbread-ai/mixedbread-python/commit/c7f1a92a897408fe54d22ae773e617c0eb9be584))
11
+ * **api:** api update ([34d8ca8](https://github.com/mixedbread-ai/mixedbread-python/commit/34d8ca84c2ed2fd3a7bf77a84047741b537a178a))
12
+ * **api:** api update ([4ad956c](https://github.com/mixedbread-ai/mixedbread-python/commit/4ad956c1b52e6a08dc44958cb331451f5bec75af))
13
+ * **api:** api update ([a24ebe9](https://github.com/mixedbread-ai/mixedbread-python/commit/a24ebe9e241e075c2958cefecfe9e972a5bcd55f))
14
+ * include results in store search events response ([8bb1069](https://github.com/mixedbread-ai/mixedbread-python/commit/8bb1069f016d97cf24bf4f7031c180ca3752e07d))
15
+ * **internal:** implement indices array format for query and form serialization ([e52e262](https://github.com/mixedbread-ai/mixedbread-python/commit/e52e262bd9acd3caa49cf9ba08a29b260b722bf0))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **client:** preserve hardcoded query params when merging with user params ([83d3f20](https://github.com/mixedbread-ai/mixedbread-python/commit/83d3f201d14edd8afa08a6046c2315097d6509d4))
21
+ * ensure file data are only sent as 1 parameter ([0957f16](https://github.com/mixedbread-ai/mixedbread-python/commit/0957f16bb9a20c72499ae6ee86b9494c1e1ee5c8))
22
+ * sanitize endpoint path params ([7d519be](https://github.com/mixedbread-ai/mixedbread-python/commit/7d519be7f4ea6b2ce11c9915ee1ac903ebb97cea))
23
+
24
+
25
+ ### Performance Improvements
26
+
27
+ * **client:** optimize file structure copying in multipart requests ([63a2728](https://github.com/mixedbread-ai/mixedbread-python/commit/63a272878dc28300f5169d38cb523cc641498fed))
28
+
29
+
30
+ ### Chores
31
+
32
+ * **ci:** skip lint on metadata-only changes ([a3ec133](https://github.com/mixedbread-ai/mixedbread-python/commit/a3ec133b88d1a70a066c17e29dd2ebd5decffb25))
33
+ * **internal:** more robust bootstrap script ([5b52286](https://github.com/mixedbread-ai/mixedbread-python/commit/5b5228640759a7bf277d9478f10eeca3d358e10f))
34
+ * **internal:** update gitignore ([cf3aa78](https://github.com/mixedbread-ai/mixedbread-python/commit/cf3aa78ec44036bbedce95735ee7ab43cc4d566a))
35
+ * **tests:** bump steady to v0.19.4 ([d6e32d5](https://github.com/mixedbread-ai/mixedbread-python/commit/d6e32d5abe0e137375ea79373033c07057b22c83))
36
+ * **tests:** bump steady to v0.19.5 ([59351b9](https://github.com/mixedbread-ai/mixedbread-python/commit/59351b9dcb0eaf2578c985c80a0501d610ff357d))
37
+ * **tests:** bump steady to v0.19.6 ([ac0e7ac](https://github.com/mixedbread-ai/mixedbread-python/commit/ac0e7acc35384a0ae9f78040b60bce03f8258d81))
38
+ * **tests:** bump steady to v0.19.7 ([839ee9c](https://github.com/mixedbread-ai/mixedbread-python/commit/839ee9c7c60749ae03a125f84e87a7be9365daac))
39
+ * **tests:** bump steady to v0.20.1 ([31e2274](https://github.com/mixedbread-ai/mixedbread-python/commit/31e2274bfe265fbebae02c86beae2f575f9b7b18))
40
+ * **tests:** bump steady to v0.20.2 ([6879b15](https://github.com/mixedbread-ai/mixedbread-python/commit/6879b159d830df5df58696899c7551c709595ed4))
41
+ * **tests:** bump steady to v0.22.1 ([3f6450d](https://github.com/mixedbread-ai/mixedbread-python/commit/3f6450dbda2fe9baeee031495fd10f4d87fa815a))
42
+
43
+
44
+ ### Refactors
45
+
46
+ * **tests:** switch from prism to steady ([cc454cf](https://github.com/mixedbread-ai/mixedbread-python/commit/cc454cfbe5752c8e439361c52fb31d2d2b14180d))
47
+
48
+ ## 0.49.0 (2026-03-19)
49
+
50
+ Full Changelog: [v0.48.0...v0.49.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.48.0...v0.49.0)
51
+
52
+ ### Features
53
+
54
+ * **api:** api update ([dc87556](https://github.com/mixedbread-ai/mixedbread-python/commit/dc875560329b32cf5fc0421a162af671bb956e7c))
55
+
3
56
  ## 0.48.0 (2026-03-18)
4
57
 
5
58
  Full Changelog: [v0.47.1...v0.48.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.47.1...v0.48.0)
@@ -85,7 +85,7 @@ $ pip install ./path-to-wheel-file.whl
85
85
 
86
86
  ## Running tests
87
87
 
88
- Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
88
+ Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.
89
89
 
90
90
  ```sh
91
91
  $ ./scripts/mock
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mixedbread
3
- Version: 0.48.0
3
+ Version: 0.50.0
4
4
  Summary: The official Python library for the Mixedbread API
5
5
  Project-URL: Homepage, https://github.com/mixedbread-ai/mixedbread-python
6
6
  Project-URL: Repository, https://github.com/mixedbread-ai/mixedbread-python
@@ -30,13 +30,29 @@ Types:
30
30
 
31
31
  ```python
32
32
  from mixedbread.types import (
33
+ AgenticSearchConfig,
34
+ AudioChunkGeneratedMetadata,
35
+ AudioURL,
36
+ CodeChunkGeneratedMetadata,
37
+ ContextualizationConfig,
33
38
  ExpiresAfter,
39
+ FileCounts,
40
+ ImageChunkGeneratedMetadata,
41
+ ImageURLOutput,
42
+ MarkdownChunkGeneratedMetadata,
43
+ MarkdownHeading,
44
+ PdfChunkGeneratedMetadata,
45
+ RerankConfig,
34
46
  ScoredAudioURLInputChunk,
35
47
  ScoredImageURLInputChunk,
36
48
  ScoredTextInputChunk,
37
49
  ScoredVideoURLInputChunk,
38
50
  Store,
39
51
  StoreChunkSearchOptions,
52
+ StoreConfig,
53
+ TextChunkGeneratedMetadata,
54
+ VideoChunkGeneratedMetadata,
55
+ VideoURL,
40
56
  StoreDeleteResponse,
41
57
  StoreMetadataFacetsResponse,
42
58
  StoreQuestionAnsweringResponse,
@@ -61,12 +77,15 @@ Types:
61
77
 
62
78
  ```python
63
79
  from mixedbread.types.stores import (
64
- ScoredStoreFile,
65
- StoreFileStatus,
80
+ AudioURLInputChunk,
81
+ ImageURLInputChunk,
66
82
  StoreFile,
83
+ StoreFileConfig,
84
+ StoreFileStatus,
85
+ TextInputChunk,
86
+ VideoURLInputChunk,
67
87
  FileListResponse,
68
88
  FileDeleteResponse,
69
- FileSearchResponse,
70
89
  )
71
90
  ```
72
91
 
@@ -77,7 +96,6 @@ Methods:
77
96
  - <code title="patch /v1/stores/{store_identifier}/files/{file_identifier}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">update</a>(file_identifier, \*, store_identifier, \*\*<a href="src/mixedbread/types/stores/file_update_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
78
97
  - <code title="post /v1/stores/{store_identifier}/files/list">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">list</a>(store_identifier, \*\*<a href="src/mixedbread/types/stores/file_list_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_list_response.py">FileListResponse</a></code>
79
98
  - <code title="delete /v1/stores/{store_identifier}/files/{file_identifier}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">delete</a>(file_identifier, \*, store_identifier) -> <a href="./src/mixedbread/types/stores/file_delete_response.py">FileDeleteResponse</a></code>
80
- - <code title="post /v1/stores/files/search">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">search</a>(\*\*<a href="src/mixedbread/types/stores/file_search_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_search_response.py">FileSearchResponse</a></code>
81
99
 
82
100
  # Parsing
83
101
 
@@ -87,10 +105,13 @@ Types:
87
105
 
88
106
  ```python
89
107
  from mixedbread.types.parsing import (
108
+ Chunk,
109
+ ChunkElement,
90
110
  ChunkingStrategy,
111
+ DocumentParserResult,
91
112
  ElementType,
92
- ParsingJobStatus,
93
113
  ParsingJob,
114
+ ParsingJobStatus,
94
115
  ReturnFormat,
95
116
  JobListResponse,
96
117
  JobDeleteResponse,
@@ -204,7 +225,9 @@ Types:
204
225
 
205
226
  ```python
206
227
  from mixedbread.types import (
228
+ APIKeyCreateOrUpdateParams,
207
229
  DataSource,
230
+ DataSourceAPIKeyParams,
208
231
  DataSourceOauth2Params,
209
232
  DataSourceType,
210
233
  LinearDataSource,
@@ -243,7 +266,7 @@ Methods:
243
266
  Types:
244
267
 
245
268
  ```python
246
- from mixedbread.types import APIKey, APIKeyCreated, APIKeyDeleteResponse
269
+ from mixedbread.types import APIKey, APIKeyCreated, Scope, APIKeyDeleteResponse
247
270
  ```
248
271
 
249
272
  Methods:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mixedbread"
3
- version = "0.48.0"
3
+ version = "0.50.0"
4
4
  description = "The official Python library for the Mixedbread API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -540,6 +540,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
540
540
  files = cast(HttpxRequestFiles, ForceMultipartDict())
541
541
 
542
542
  prepared_url = self._prepare_url(options.url)
543
+ # preserve hard-coded query params from the url
544
+ if params and prepared_url.query:
545
+ params = {**dict(prepared_url.params.items()), **params}
546
+ prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
543
547
  if "_" in prepared_url.host:
544
548
  # work around https://github.com/encode/httpx/discussions/2880
545
549
  kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
@@ -3,8 +3,8 @@ from __future__ import annotations
3
3
  import io
4
4
  import os
5
5
  import pathlib
6
- from typing import overload
7
- from typing_extensions import TypeGuard
6
+ from typing import Sequence, cast, overload
7
+ from typing_extensions import TypeVar, TypeGuard
8
8
 
9
9
  import anyio
10
10
 
@@ -17,7 +17,9 @@ from ._types import (
17
17
  HttpxFileContent,
18
18
  HttpxRequestFiles,
19
19
  )
20
- from ._utils import is_tuple_t, is_mapping_t, is_sequence_t
20
+ from ._utils import is_list, is_mapping, is_tuple_t, is_mapping_t, is_sequence_t
21
+
22
+ _T = TypeVar("_T")
21
23
 
22
24
 
23
25
  def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]:
@@ -121,3 +123,51 @@ async def async_read_file_content(file: FileContent) -> HttpxFileContent:
121
123
  return await anyio.Path(file).read_bytes()
122
124
 
123
125
  return file
126
+
127
+
128
+ def deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]]) -> _T:
129
+ """Copy only the containers along the given paths.
130
+
131
+ Used to guard against mutation by extract_files without copying the entire structure.
132
+ Only dicts and lists that lie on a path are copied; everything else
133
+ is returned by reference.
134
+
135
+ For example, given paths=[["foo", "files", "file"]] and the structure:
136
+ {
137
+ "foo": {
138
+ "bar": {"baz": {}},
139
+ "files": {"file": <content>}
140
+ }
141
+ }
142
+ The root dict, "foo", and "files" are copied (they lie on the path).
143
+ "bar" and "baz" are returned by reference (off the path).
144
+ """
145
+ return _deepcopy_with_paths(item, paths, 0)
146
+
147
+
148
+ def _deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]], index: int) -> _T:
149
+ if not paths:
150
+ return item
151
+ if is_mapping(item):
152
+ key_to_paths: dict[str, list[Sequence[str]]] = {}
153
+ for path in paths:
154
+ if index < len(path):
155
+ key_to_paths.setdefault(path[index], []).append(path)
156
+
157
+ # if no path continues through this mapping, it won't be mutated and copying it is redundant
158
+ if not key_to_paths:
159
+ return item
160
+
161
+ result = dict(item)
162
+ for key, subpaths in key_to_paths.items():
163
+ if key in result:
164
+ result[key] = _deepcopy_with_paths(result[key], subpaths, index + 1)
165
+ return cast(_T, result)
166
+ if is_list(item):
167
+ array_paths = [path for path in paths if index < len(path) and path[index] == "<array>"]
168
+
169
+ # if no path expects a list here, nothing will be mutated inside it - return by reference
170
+ if not array_paths:
171
+ return cast(_T, item)
172
+ return cast(_T, [_deepcopy_with_paths(entry, array_paths, index + 1) for entry in item])
173
+ return item
@@ -101,7 +101,10 @@ class Querystring:
101
101
  items.extend(self._stringify_item(key, item, opts))
102
102
  return items
103
103
  elif array_format == "indices":
104
- raise NotImplementedError("The array indices format is not supported yet")
104
+ items = []
105
+ for i, item in enumerate(value):
106
+ items.extend(self._stringify_item(f"{key}[{i}]", item, opts))
107
+ return items
105
108
  elif array_format == "brackets":
106
109
  items = []
107
110
  key = key + "[]"
@@ -1,3 +1,4 @@
1
+ from ._path import path_template as path_template
1
2
  from ._sync import asyncify as asyncify
2
3
  from ._proxy import LazyProxy as LazyProxy
3
4
  from ._utils import (
@@ -23,7 +24,6 @@ from ._utils import (
23
24
  coerce_integer as coerce_integer,
24
25
  file_from_path as file_from_path,
25
26
  strip_not_given as strip_not_given,
26
- deepcopy_minimal as deepcopy_minimal,
27
27
  get_async_library as get_async_library,
28
28
  maybe_coerce_float as maybe_coerce_float,
29
29
  get_required_header as get_required_header,
@@ -0,0 +1,127 @@
1
+ from __future__ import annotations
2
+
3
+ import re
4
+ from typing import (
5
+ Any,
6
+ Mapping,
7
+ Callable,
8
+ )
9
+ from urllib.parse import quote
10
+
11
+ # Matches '.' or '..' where each dot is either literal or percent-encoded (%2e / %2E).
12
+ _DOT_SEGMENT_RE = re.compile(r"^(?:\.|%2[eE]){1,2}$")
13
+
14
+ _PLACEHOLDER_RE = re.compile(r"\{(\w+)\}")
15
+
16
+
17
+ def _quote_path_segment_part(value: str) -> str:
18
+ """Percent-encode `value` for use in a URI path segment.
19
+
20
+ Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe.
21
+ https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
22
+ """
23
+ # quote() already treats unreserved characters (letters, digits, and -._~)
24
+ # as safe, so we only need to add sub-delims, ':', and '@'.
25
+ # Notably, unlike the default `safe` for quote(), / is unsafe and must be quoted.
26
+ return quote(value, safe="!$&'()*+,;=:@")
27
+
28
+
29
+ def _quote_query_part(value: str) -> str:
30
+ """Percent-encode `value` for use in a URI query string.
31
+
32
+ Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe.
33
+ https://datatracker.ietf.org/doc/html/rfc3986#section-3.4
34
+ """
35
+ return quote(value, safe="!$'()*+,;:@/?")
36
+
37
+
38
+ def _quote_fragment_part(value: str) -> str:
39
+ """Percent-encode `value` for use in a URI fragment.
40
+
41
+ Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe.
42
+ https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
43
+ """
44
+ return quote(value, safe="!$&'()*+,;=:@/?")
45
+
46
+
47
+ def _interpolate(
48
+ template: str,
49
+ values: Mapping[str, Any],
50
+ quoter: Callable[[str], str],
51
+ ) -> str:
52
+ """Replace {name} placeholders in `template`, quoting each value with `quoter`.
53
+
54
+ Placeholder names are looked up in `values`.
55
+
56
+ Raises:
57
+ KeyError: If a placeholder is not found in `values`.
58
+ """
59
+ # re.split with a capturing group returns alternating
60
+ # [text, name, text, name, ..., text] elements.
61
+ parts = _PLACEHOLDER_RE.split(template)
62
+
63
+ for i in range(1, len(parts), 2):
64
+ name = parts[i]
65
+ if name not in values:
66
+ raise KeyError(f"a value for placeholder {{{name}}} was not provided")
67
+ val = values[name]
68
+ if val is None:
69
+ parts[i] = "null"
70
+ elif isinstance(val, bool):
71
+ parts[i] = "true" if val else "false"
72
+ else:
73
+ parts[i] = quoter(str(values[name]))
74
+
75
+ return "".join(parts)
76
+
77
+
78
+ def path_template(template: str, /, **kwargs: Any) -> str:
79
+ """Interpolate {name} placeholders in `template` from keyword arguments.
80
+
81
+ Args:
82
+ template: The template string containing {name} placeholders.
83
+ **kwargs: Keyword arguments to interpolate into the template.
84
+
85
+ Returns:
86
+ The template with placeholders interpolated and percent-encoded.
87
+
88
+ Safe characters for percent-encoding are dependent on the URI component.
89
+ Placeholders in path and fragment portions are percent-encoded where the `segment`
90
+ and `fragment` sets from RFC 3986 respectively are considered safe.
91
+ Placeholders in the query portion are percent-encoded where the `query` set from
92
+ RFC 3986 §3.3 is considered safe except for = and & characters.
93
+
94
+ Raises:
95
+ KeyError: If a placeholder is not found in `kwargs`.
96
+ ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments).
97
+ """
98
+ # Split the template into path, query, and fragment portions.
99
+ fragment_template: str | None = None
100
+ query_template: str | None = None
101
+
102
+ rest = template
103
+ if "#" in rest:
104
+ rest, fragment_template = rest.split("#", 1)
105
+ if "?" in rest:
106
+ rest, query_template = rest.split("?", 1)
107
+ path_template = rest
108
+
109
+ # Interpolate each portion with the appropriate quoting rules.
110
+ path_result = _interpolate(path_template, kwargs, _quote_path_segment_part)
111
+
112
+ # Reject dot-segments (. and ..) in the final assembled path. The check
113
+ # runs after interpolation so that adjacent placeholders or a mix of static
114
+ # text and placeholders that together form a dot-segment are caught.
115
+ # Also reject percent-encoded dot-segments to protect against incorrectly
116
+ # implemented normalization in servers/proxies.
117
+ for segment in path_result.split("/"):
118
+ if _DOT_SEGMENT_RE.match(segment):
119
+ raise ValueError(f"Constructed path {path_result!r} contains dot-segment {segment!r} which is not allowed")
120
+
121
+ result = path_result
122
+ if query_template is not None:
123
+ result += "?" + _interpolate(query_template, kwargs, _quote_query_part)
124
+ if fragment_template is not None:
125
+ result += "#" + _interpolate(fragment_template, kwargs, _quote_fragment_part)
126
+
127
+ return result
@@ -86,8 +86,9 @@ def _extract_items(
86
86
  index += 1
87
87
  if is_dict(obj):
88
88
  try:
89
- # We are at the last entry in the path so we must remove the field
90
- if (len(path)) == index:
89
+ # Remove the field if there are no more dict keys in the path,
90
+ # only "<array>" traversal markers or end.
91
+ if all(p == "<array>" for p in path[index:]):
91
92
  item = obj.pop(key)
92
93
  else:
93
94
  item = obj[key]
@@ -176,21 +177,6 @@ def is_iterable(obj: object) -> TypeGuard[Iterable[object]]:
176
177
  return isinstance(obj, Iterable)
177
178
 
178
179
 
179
- def deepcopy_minimal(item: _T) -> _T:
180
- """Minimal reimplementation of copy.deepcopy() that will only copy certain object types:
181
-
182
- - mappings, e.g. `dict`
183
- - list
184
-
185
- This is done for performance reasons.
186
- """
187
- if is_mapping(item):
188
- return cast(_T, {k: deepcopy_minimal(v) for k, v in item.items()})
189
- if is_list(item):
190
- return cast(_T, [deepcopy_minimal(entry) for entry in item])
191
- return item
192
-
193
-
194
180
  # copied from https://github.com/Rapptz/RoboDanny
195
181
  def human_join(seq: Sequence[str], *, delim: str = ", ", final: str = "or") -> str:
196
182
  size = len(seq)
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "mixedbread"
4
- __version__ = "0.48.0" # x-release-please-version
4
+ __version__ = "0.50.0" # x-release-please-version
@@ -9,7 +9,7 @@ import httpx
9
9
 
10
10
  from ..types import api_key_list_params, api_key_create_params
11
11
  from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
12
- from .._utils import maybe_transform, async_maybe_transform
12
+ from .._utils import path_template, maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
15
15
  from .._response import (
@@ -21,6 +21,7 @@ from .._response import (
21
21
  from ..pagination import SyncLimitOffset, AsyncLimitOffset
22
22
  from .._base_client import AsyncPaginator, make_request_options
23
23
  from ..types.api_key import APIKey
24
+ from ..types.scope_param import ScopeParam
24
25
  from ..types.api_key_created import APIKeyCreated
25
26
  from ..types.api_key_delete_response import APIKeyDeleteResponse
26
27
 
@@ -51,7 +52,7 @@ class APIKeysResource(SyncAPIResource):
51
52
  self,
52
53
  *,
53
54
  name: str | Omit = omit,
54
- scope: Optional[Iterable[api_key_create_params.Scope]] | Omit = omit,
55
+ scope: Optional[Iterable[ScopeParam]] | Omit = omit,
55
56
  expires_at: Union[str, datetime, None] | Omit = omit,
56
57
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
58
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -131,7 +132,7 @@ class APIKeysResource(SyncAPIResource):
131
132
  if not api_key_id:
132
133
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
133
134
  return self._get(
134
- f"/v1/api-keys/{api_key_id}",
135
+ path_template("/v1/api-keys/{api_key_id}", api_key_id=api_key_id),
135
136
  options=make_request_options(
136
137
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
137
138
  ),
@@ -222,7 +223,7 @@ class APIKeysResource(SyncAPIResource):
222
223
  if not api_key_id:
223
224
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
224
225
  return self._delete(
225
- f"/v1/api-keys/{api_key_id}",
226
+ path_template("/v1/api-keys/{api_key_id}", api_key_id=api_key_id),
226
227
  options=make_request_options(
227
228
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
228
229
  ),
@@ -264,7 +265,7 @@ class APIKeysResource(SyncAPIResource):
264
265
  if not api_key_id:
265
266
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
266
267
  return self._post(
267
- f"/v1/api-keys/{api_key_id}/reroll",
268
+ path_template("/v1/api-keys/{api_key_id}/reroll", api_key_id=api_key_id),
268
269
  options=make_request_options(
269
270
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
270
271
  ),
@@ -303,7 +304,7 @@ class APIKeysResource(SyncAPIResource):
303
304
  if not api_key_id:
304
305
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
305
306
  return self._post(
306
- f"/v1/api-keys/{api_key_id}/revoke",
307
+ path_template("/v1/api-keys/{api_key_id}/revoke", api_key_id=api_key_id),
307
308
  options=make_request_options(
308
309
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
309
310
  ),
@@ -335,7 +336,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
335
336
  self,
336
337
  *,
337
338
  name: str | Omit = omit,
338
- scope: Optional[Iterable[api_key_create_params.Scope]] | Omit = omit,
339
+ scope: Optional[Iterable[ScopeParam]] | Omit = omit,
339
340
  expires_at: Union[str, datetime, None] | Omit = omit,
340
341
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
341
342
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -415,7 +416,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
415
416
  if not api_key_id:
416
417
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
417
418
  return await self._get(
418
- f"/v1/api-keys/{api_key_id}",
419
+ path_template("/v1/api-keys/{api_key_id}", api_key_id=api_key_id),
419
420
  options=make_request_options(
420
421
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
421
422
  ),
@@ -506,7 +507,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
506
507
  if not api_key_id:
507
508
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
508
509
  return await self._delete(
509
- f"/v1/api-keys/{api_key_id}",
510
+ path_template("/v1/api-keys/{api_key_id}", api_key_id=api_key_id),
510
511
  options=make_request_options(
511
512
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
512
513
  ),
@@ -548,7 +549,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
548
549
  if not api_key_id:
549
550
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
550
551
  return await self._post(
551
- f"/v1/api-keys/{api_key_id}/reroll",
552
+ path_template("/v1/api-keys/{api_key_id}/reroll", api_key_id=api_key_id),
552
553
  options=make_request_options(
553
554
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
554
555
  ),
@@ -587,7 +588,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
587
588
  if not api_key_id:
588
589
  raise ValueError(f"Expected a non-empty value for `api_key_id` but received {api_key_id!r}")
589
590
  return await self._post(
590
- f"/v1/api-keys/{api_key_id}/revoke",
591
+ path_template("/v1/api-keys/{api_key_id}/revoke", api_key_id=api_key_id),
591
592
  options=make_request_options(
592
593
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
593
594
  ),