bluehive 0.1.0a18__py3-none-any.whl → 0.1.0a20__py3-none-any.whl

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.
bluehive/_streaming.py CHANGED
@@ -54,11 +54,12 @@ class Stream(Generic[_T]):
54
54
  process_data = self._client._process_response_data
55
55
  iterator = self._iter_events()
56
56
 
57
- for sse in iterator:
58
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
-
60
- # As we might not fully consume the response stream, we need to close it explicitly
61
- response.close()
57
+ try:
58
+ for sse in iterator:
59
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
60
+ finally:
61
+ # Ensure the response is closed even if the consumer doesn't read all data
62
+ response.close()
62
63
 
63
64
  def __enter__(self) -> Self:
64
65
  return self
@@ -117,11 +118,12 @@ class AsyncStream(Generic[_T]):
117
118
  process_data = self._client._process_response_data
118
119
  iterator = self._iter_events()
119
120
 
120
- async for sse in iterator:
121
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
122
-
123
- # As we might not fully consume the response stream, we need to close it explicitly
124
- await response.aclose()
121
+ try:
122
+ async for sse in iterator:
123
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
124
+ finally:
125
+ # Ensure the response is closed even if the consumer doesn't read all data
126
+ await response.aclose()
125
127
 
126
128
  async def __aenter__(self) -> Self:
127
129
  return self
bluehive/_types.py CHANGED
@@ -243,6 +243,9 @@ _T_co = TypeVar("_T_co", covariant=True)
243
243
  if TYPE_CHECKING:
244
244
  # This works because str.__contains__ does not accept object (either in typeshed or at runtime)
245
245
  # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
246
+ #
247
+ # Note: index() and count() methods are intentionally omitted to allow pyright to properly
248
+ # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
246
249
  class SequenceNotStr(Protocol[_T_co]):
247
250
  @overload
248
251
  def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -251,8 +254,6 @@ if TYPE_CHECKING:
251
254
  def __contains__(self, value: object, /) -> bool: ...
252
255
  def __len__(self) -> int: ...
253
256
  def __iter__(self) -> Iterator[_T_co]: ...
254
- def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
255
- def count(self, value: Any, /) -> int: ...
256
257
  def __reversed__(self) -> Iterator[_T_co]: ...
257
258
  else:
258
259
  # just point this to a normal `Sequence` at runtime to avoid having to special case
bluehive/_version.py CHANGED
@@ -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.18" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.20" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bluehive
3
- Version: 0.1.0a18
3
+ Version: 0.1.0a20
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
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.9
@@ -9,9 +9,9 @@ bluehive/_models.py,sha256=3D65psj_C02Mw0K2zpBWrn1khmrvtEXgTTQ6P4r3tUY,31837
9
9
  bluehive/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  bluehive/_resource.py,sha256=MI2mGktYiePpr3PUh2uCPn1ubEsju6JkKoMupdTaqtc,1112
11
11
  bluehive/_response.py,sha256=u3wZ9ksvCqcP549TZTsozw0LNZmHf1yPVWPo1hxMNDg,28800
12
- bluehive/_streaming.py,sha256=ULiijxzSukAhT9t9G-1Mo2ks4iUt6kvD9NHYB8WlJwk,10157
13
- bluehive/_types.py,sha256=9h31eihqlGo3KevS5EpSAWg-hJWTZW4wsWCrlTkVC_4,7238
14
- bluehive/_version.py,sha256=eFSYM44aK-XG2cCcX7WeHJ3RkAzJGxxjBVi4OHqD108,169
12
+ bluehive/_streaming.py,sha256=XdfOw0CK5YOWsYw0YebCWmglGspKi9NOzjkR3Krj9To,10229
13
+ bluehive/_types.py,sha256=a8wHSA7q6T1mqY4qaWJYzAfVCjO6Vm8UOIgCOc4EMhQ,7297
14
+ bluehive/_version.py,sha256=kBheHSp_qxun39gj_vErioGVAzkvcyicxv0zqmxbGHQ,169
15
15
  bluehive/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  bluehive/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  bluehive/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -91,7 +91,7 @@ bluehive/types/employers/service_bundle_list_response.py,sha256=vnZlYv7KObJ0OSSY
91
91
  bluehive/types/employers/service_bundle_retrieve_response.py,sha256=9nwdzfgErAQFzqwivKhKCLqA9k7ZsMj4YbNig09-Eho,1030
92
92
  bluehive/types/employers/service_bundle_update_params.py,sha256=gxRnvCSsBsUqi1M91nhEXgj-2l03xlrnPeXOPAQ1ujA,812
93
93
  bluehive/types/employers/service_bundle_update_response.py,sha256=zUR_nYflDEmLSmTcFb4EaTELCInqZZI-VIBHgcPq7G4,1026
94
- bluehive-0.1.0a18.dist-info/METADATA,sha256=PiFy8SYh7rMUGr-eeEemUiGM1kbKywbva7tnxxkr9gg,13629
95
- bluehive-0.1.0a18.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
96
- bluehive-0.1.0a18.dist-info/licenses/LICENSE,sha256=Q2LP5YQQAGzyScIIkgum9Z19KCG4jZvZHMgDQ_vOOqM,11338
97
- bluehive-0.1.0a18.dist-info/RECORD,,
94
+ bluehive-0.1.0a20.dist-info/METADATA,sha256=6-LISRQKDTHcQrzrBSdoOedIV_X6w1e2-waK1YlXe6M,13680
95
+ bluehive-0.1.0a20.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
96
+ bluehive-0.1.0a20.dist-info/licenses/LICENSE,sha256=Q2LP5YQQAGzyScIIkgum9Z19KCG4jZvZHMgDQ_vOOqM,11338
97
+ bluehive-0.1.0a20.dist-info/RECORD,,