bluehive 0.1.0a14__tar.gz → 0.1.0a16__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 (141) hide show
  1. bluehive-0.1.0a16/.release-please-manifest.json +3 -0
  2. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/CHANGELOG.md +28 -0
  3. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/PKG-INFO +5 -6
  4. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/README.md +2 -2
  5. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/pyproject.toml +4 -5
  6. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/requirements-dev.lock +1 -1
  7. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/requirements.lock +1 -1
  8. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_models.py +8 -3
  9. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_streaming.py +4 -6
  10. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_sync.py +3 -31
  11. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_utils.py +1 -1
  12. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_version.py +1 -1
  13. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_client.py +198 -164
  14. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_models.py +4 -4
  15. bluehive-0.1.0a14/.release-please-manifest.json +0 -3
  16. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/.gitignore +0 -0
  17. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/CONTRIBUTING.md +0 -0
  18. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/LICENSE +0 -0
  19. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/SECURITY.md +0 -0
  20. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/api.md +0 -0
  21. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/bin/check-release-environment +0 -0
  22. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/bin/publish-pypi +0 -0
  23. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/examples/.keep +0 -0
  24. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/noxfile.py +0 -0
  25. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/release-please-config.json +0 -0
  26. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/__init__.py +0 -0
  27. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_base_client.py +0 -0
  28. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_client.py +0 -0
  29. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_compat.py +0 -0
  30. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_constants.py +0 -0
  31. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_exceptions.py +0 -0
  32. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_files.py +0 -0
  33. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_qs.py +0 -0
  34. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_resource.py +0 -0
  35. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_response.py +0 -0
  36. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_types.py +0 -0
  37. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/__init__.py +0 -0
  38. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_compat.py +0 -0
  39. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_datetime_parse.py +0 -0
  40. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_logs.py +0 -0
  41. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_proxy.py +0 -0
  42. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_reflection.py +0 -0
  43. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_resources_proxy.py +0 -0
  44. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_streams.py +0 -0
  45. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_transform.py +0 -0
  46. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/_utils/_typing.py +0 -0
  47. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/lib/.keep +0 -0
  48. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/py.typed +0 -0
  49. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/__init__.py +0 -0
  50. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/database.py +0 -0
  51. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/employees.py +0 -0
  52. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/employers/__init__.py +0 -0
  53. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/employers/employers.py +0 -0
  54. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/employers/service_bundles.py +0 -0
  55. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/fax.py +0 -0
  56. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/health.py +0 -0
  57. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/hl7.py +0 -0
  58. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/integrations.py +0 -0
  59. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/orders.py +0 -0
  60. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/providers.py +0 -0
  61. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/resources/version.py +0 -0
  62. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/__init__.py +0 -0
  63. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/database_check_health_response.py +0 -0
  64. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_create_params.py +0 -0
  65. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_create_response.py +0 -0
  66. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_delete_response.py +0 -0
  67. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_link_user_params.py +0 -0
  68. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_link_user_response.py +0 -0
  69. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_list_params.py +0 -0
  70. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_list_response.py +0 -0
  71. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_retrieve_response.py +0 -0
  72. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_unlink_user_params.py +0 -0
  73. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_unlink_user_response.py +0 -0
  74. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_update_params.py +0 -0
  75. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employee_update_response.py +0 -0
  76. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employer_create_params.py +0 -0
  77. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employer_create_response.py +0 -0
  78. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employer_list_response.py +0 -0
  79. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employer_retrieve_response.py +0 -0
  80. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/__init__.py +0 -0
  81. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_create_params.py +0 -0
  82. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_create_response.py +0 -0
  83. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_list_response.py +0 -0
  84. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_retrieve_response.py +0 -0
  85. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_update_params.py +0 -0
  86. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/employers/service_bundle_update_response.py +0 -0
  87. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/fax_list_providers_response.py +0 -0
  88. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/fax_retrieve_status_response.py +0 -0
  89. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/fax_send_params.py +0 -0
  90. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/fax_send_response.py +0 -0
  91. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/health_check_response.py +0 -0
  92. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/hl7_send_results_params.py +0 -0
  93. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/hl7_send_results_response.py +0 -0
  94. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/integration_check_active_response.py +0 -0
  95. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/integration_list_response.py +0 -0
  96. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_create_params.py +0 -0
  97. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_create_response.py +0 -0
  98. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_retrieve_response.py +0 -0
  99. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_retrieve_results_params.py +0 -0
  100. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_retrieve_results_response.py +0 -0
  101. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_schedule_appointment_params.py +0 -0
  102. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_schedule_appointment_response.py +0 -0
  103. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_send_for_employee_params.py +0 -0
  104. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_send_for_employee_response.py +0 -0
  105. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_update_params.py +0 -0
  106. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_update_response.py +0 -0
  107. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_update_status_params.py +0 -0
  108. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_update_status_response.py +0 -0
  109. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_upload_results_params.py +0 -0
  110. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/order_upload_results_response.py +0 -0
  111. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/provider_lookup_params.py +0 -0
  112. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/provider_lookup_response.py +0 -0
  113. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/src/bluehive/types/version_retrieve_response.py +0 -0
  114. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/__init__.py +0 -0
  115. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/__init__.py +0 -0
  116. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/employers/__init__.py +0 -0
  117. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/employers/test_service_bundles.py +0 -0
  118. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_database.py +0 -0
  119. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_employees.py +0 -0
  120. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_employers.py +0 -0
  121. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_fax.py +0 -0
  122. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_health.py +0 -0
  123. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_hl7.py +0 -0
  124. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_integrations.py +0 -0
  125. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_orders.py +0 -0
  126. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_providers.py +0 -0
  127. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/api_resources/test_version.py +0 -0
  128. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/conftest.py +0 -0
  129. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/sample_file.txt +0 -0
  130. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_deepcopy.py +0 -0
  131. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_extract_files.py +0 -0
  132. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_files.py +0 -0
  133. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_qs.py +0 -0
  134. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_required_args.py +0 -0
  135. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_response.py +0 -0
  136. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_streaming.py +0 -0
  137. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_transform.py +0 -0
  138. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_utils/test_datetime_parse.py +0 -0
  139. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_utils/test_proxy.py +0 -0
  140. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/test_utils/test_typing.py +0 -0
  141. {bluehive-0.1.0a14 → bluehive-0.1.0a16}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.16"
3
+ }
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.16 (2025-11-11)
4
+
5
+ Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
6
+
7
+ ### Bug Fixes
8
+
9
+ * compat with Python 3.14 ([c705861](https://github.com/bluehive-health/bluehive-sdk-python/commit/c7058616c0a1a3a1c57acc60afeec14f0ee0c731))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal/tests:** avoid race condition with implicit client cleanup ([a192964](https://github.com/bluehive-health/bluehive-sdk-python/commit/a19296467f6b7ccee2eefd1a15982e2360a969c7))
15
+ * **internal:** grammar fix (it's -> its) ([1f55feb](https://github.com/bluehive-health/bluehive-sdk-python/commit/1f55feb4f4e96ff030a18511fe1429c3f35272d0))
16
+ * **package:** drop Python 3.8 support ([51484a6](https://github.com/bluehive-health/bluehive-sdk-python/commit/51484a6fbc684a6629be881b461e943b6ffd83f1))
17
+
18
+ ## 0.1.0-alpha.15 (2025-10-30)
19
+
20
+ Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
21
+
22
+ ### Bug Fixes
23
+
24
+ * **client:** close streams without requiring full consumption ([25e1e7c](https://github.com/bluehive-health/bluehive-sdk-python/commit/25e1e7ca071fda5025c0999704e48963d08eea1c))
25
+
26
+
27
+ ### Chores
28
+
29
+ * bump `httpx-aiohttp` version to 0.1.9 ([6cf61e6](https://github.com/bluehive-health/bluehive-sdk-python/commit/6cf61e624fdafed663c932e964287c94b870659e))
30
+
3
31
  ## 0.1.0-alpha.14 (2025-10-13)
4
32
 
5
33
  Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/bluehive-health/bluehive-sdk-python/compare/v0.1.0-alpha.13...v0.1.0-alpha.14)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bluehive
3
- Version: 0.1.0a14
3
+ Version: 0.1.0a16
4
4
  Summary: The official Python library for the bluehive API
5
5
  Project-URL: Homepage, https://github.com/bluehive-health/bluehive-sdk-python
6
6
  Project-URL: Repository, https://github.com/bluehive-health/bluehive-sdk-python
@@ -13,7 +13,6 @@ Classifier: Operating System :: Microsoft :: Windows
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Operating System :: POSIX :: Linux
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
@@ -21,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
22
  Classifier: Typing :: Typed
24
- Requires-Python: >=3.8
23
+ Requires-Python: >=3.9
25
24
  Requires-Dist: anyio<5,>=3.5.0
26
25
  Requires-Dist: distro<2,>=1.7.0
27
26
  Requires-Dist: httpx<1,>=0.23.0
@@ -30,7 +29,7 @@ Requires-Dist: sniffio
30
29
  Requires-Dist: typing-extensions<5,>=4.10
31
30
  Provides-Extra: aiohttp
32
31
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
32
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
33
  Description-Content-Type: text/markdown
35
34
 
36
35
  # BlueHive Python API library
@@ -38,7 +37,7 @@ Description-Content-Type: text/markdown
38
37
  <!-- prettier-ignore -->
39
38
  [![PyPI version](https://img.shields.io/pypi/v/bluehive.svg?label=pypi%20(stable))](https://pypi.org/project/bluehive/)
40
39
 
41
- The BlueHive Python library provides convenient access to the BlueHive REST API from any Python 3.8+
40
+ The BlueHive Python library provides convenient access to the BlueHive REST API from any Python 3.9+
42
41
  application. The library includes type definitions for all request params and response fields,
43
42
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
44
43
 
@@ -403,7 +402,7 @@ print(bluehive.__version__)
403
402
 
404
403
  ## Requirements
405
404
 
406
- Python 3.8 or higher.
405
+ Python 3.9 or higher.
407
406
 
408
407
  ## Contributing
409
408
 
@@ -3,7 +3,7 @@
3
3
  <!-- prettier-ignore -->
4
4
  [![PyPI version](https://img.shields.io/pypi/v/bluehive.svg?label=pypi%20(stable))](https://pypi.org/project/bluehive/)
5
5
 
6
- The BlueHive Python library provides convenient access to the BlueHive REST API from any Python 3.8+
6
+ The BlueHive Python library provides convenient access to the BlueHive REST API from any Python 3.9+
7
7
  application. The library includes type definitions for all request params and response fields,
8
8
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
9
9
 
@@ -368,7 +368,7 @@ print(bluehive.__version__)
368
368
 
369
369
  ## Requirements
370
370
 
371
- Python 3.8 or higher.
371
+ Python 3.9 or higher.
372
372
 
373
373
  ## Contributing
374
374
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bluehive"
3
- version = "0.1.0-alpha.14"
3
+ version = "0.1.0-alpha.16"
4
4
  description = "The official Python library for the bluehive API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -15,11 +15,10 @@ dependencies = [
15
15
  "distro>=1.7.0, <2",
16
16
  "sniffio",
17
17
  ]
18
- requires-python = ">= 3.8"
18
+ requires-python = ">= 3.9"
19
19
  classifiers = [
20
20
  "Typing :: Typed",
21
21
  "Intended Audience :: Developers",
22
- "Programming Language :: Python :: 3.8",
23
22
  "Programming Language :: Python :: 3.9",
24
23
  "Programming Language :: Python :: 3.10",
25
24
  "Programming Language :: Python :: 3.11",
@@ -39,7 +38,7 @@ Homepage = "https://github.com/bluehive-health/bluehive-sdk-python"
39
38
  Repository = "https://github.com/bluehive-health/bluehive-sdk-python"
40
39
 
41
40
  [project.optional-dependencies]
42
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
41
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
43
42
 
44
43
  [tool.rye]
45
44
  managed = true
@@ -141,7 +140,7 @@ filterwarnings = [
141
140
  # there are a couple of flags that are still disabled by
142
141
  # default in strict mode as they are experimental and niche.
143
142
  typeCheckingMode = "strict"
144
- pythonVersion = "3.8"
143
+ pythonVersion = "3.9"
145
144
 
146
145
  exclude = [
147
146
  "_dev",
@@ -56,7 +56,7 @@ httpx==0.28.1
56
56
  # via bluehive
57
57
  # via httpx-aiohttp
58
58
  # via respx
59
- httpx-aiohttp==0.1.8
59
+ httpx-aiohttp==0.1.9
60
60
  # via bluehive
61
61
  idna==3.4
62
62
  # via anyio
@@ -43,7 +43,7 @@ httpcore==1.0.9
43
43
  httpx==0.28.1
44
44
  # via bluehive
45
45
  # via httpx-aiohttp
46
- httpx-aiohttp==0.1.8
46
+ httpx-aiohttp==0.1.9
47
47
  # via bluehive
48
48
  idna==3.4
49
49
  # via anyio
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import inspect
5
+ import weakref
5
6
  from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
6
7
  from datetime import date, datetime
7
8
  from typing_extensions import (
@@ -573,6 +574,9 @@ class CachedDiscriminatorType(Protocol):
573
574
  __discriminator__: DiscriminatorDetails
574
575
 
575
576
 
577
+ DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary()
578
+
579
+
576
580
  class DiscriminatorDetails:
577
581
  field_name: str
578
582
  """The name of the discriminator field in the variant class, e.g.
@@ -615,8 +619,9 @@ class DiscriminatorDetails:
615
619
 
616
620
 
617
621
  def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None:
618
- if isinstance(union, CachedDiscriminatorType):
619
- return union.__discriminator__
622
+ cached = DISCRIMINATOR_CACHE.get(union)
623
+ if cached is not None:
624
+ return cached
620
625
 
621
626
  discriminator_field_name: str | None = None
622
627
 
@@ -669,7 +674,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
669
674
  discriminator_field=discriminator_field_name,
670
675
  discriminator_alias=discriminator_alias,
671
676
  )
672
- cast(CachedDiscriminatorType, union).__discriminator__ = details
677
+ DISCRIMINATOR_CACHE.setdefault(union, details)
673
678
  return details
674
679
 
675
680
 
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
57
57
  for sse in iterator:
58
58
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
59
 
60
- # Ensure the entire stream is consumed
61
- for _sse in iterator:
62
- ...
60
+ # As we might not fully consume the response stream, we need to close it explicitly
61
+ response.close()
63
62
 
64
63
  def __enter__(self) -> Self:
65
64
  return self
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
121
120
  async for sse in iterator:
122
121
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123
122
 
124
- # Ensure the entire stream is consumed
125
- async for _sse in iterator:
126
- ...
123
+ # As we might not fully consume the response stream, we need to close it explicitly
124
+ await response.aclose()
127
125
 
128
126
  async def __aenter__(self) -> Self:
129
127
  return self
@@ -1,10 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
- import sys
4
3
  import asyncio
5
4
  import functools
6
- import contextvars
7
- from typing import Any, TypeVar, Callable, Awaitable
5
+ from typing import TypeVar, Callable, Awaitable
8
6
  from typing_extensions import ParamSpec
9
7
 
10
8
  import anyio
@@ -15,34 +13,11 @@ T_Retval = TypeVar("T_Retval")
15
13
  T_ParamSpec = ParamSpec("T_ParamSpec")
16
14
 
17
15
 
18
- if sys.version_info >= (3, 9):
19
- _asyncio_to_thread = asyncio.to_thread
20
- else:
21
- # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
22
- # for Python 3.8 support
23
- async def _asyncio_to_thread(
24
- func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
25
- ) -> Any:
26
- """Asynchronously run function *func* in a separate thread.
27
-
28
- Any *args and **kwargs supplied for this function are directly passed
29
- to *func*. Also, the current :class:`contextvars.Context` is propagated,
30
- allowing context variables from the main thread to be accessed in the
31
- separate thread.
32
-
33
- Returns a coroutine that can be awaited to get the eventual result of *func*.
34
- """
35
- loop = asyncio.events.get_running_loop()
36
- ctx = contextvars.copy_context()
37
- func_call = functools.partial(ctx.run, func, *args, **kwargs)
38
- return await loop.run_in_executor(None, func_call)
39
-
40
-
41
16
  async def to_thread(
42
17
  func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
43
18
  ) -> T_Retval:
44
19
  if sniffio.current_async_library() == "asyncio":
45
- return await _asyncio_to_thread(func, *args, **kwargs)
20
+ return await asyncio.to_thread(func, *args, **kwargs)
46
21
 
47
22
  return await anyio.to_thread.run_sync(
48
23
  functools.partial(func, *args, **kwargs),
@@ -53,10 +28,7 @@ async def to_thread(
53
28
  def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
54
29
  """
55
30
  Take a blocking function and create an async one that receives the same
56
- positional and keyword arguments. For python version 3.9 and above, it uses
57
- asyncio.to_thread to run the function in a separate thread. For python version
58
- 3.8, it uses locally defined copy of the asyncio.to_thread function which was
59
- introduced in python 3.9.
31
+ positional and keyword arguments.
60
32
 
61
33
  Usage:
62
34
 
@@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
133
133
  # Type safe methods for narrowing types with TypeVars.
134
134
  # The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
135
135
  # however this cause Pyright to rightfully report errors. As we know we don't
136
- # care about the contained types we can safely use `object` in it's place.
136
+ # care about the contained types we can safely use `object` in its place.
137
137
  #
138
138
  # There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
139
139
  # `is_*` is for when you're dealing with an unknown input
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "bluehive"
4
- __version__ = "0.1.0-alpha.14" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.16" # x-release-please-version