aiinbx 0.187.0__py3-none-any.whl → 0.205.1__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.
aiinbx/_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
aiinbx/_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__ = "aiinbx"
4
- __version__ = "0.187.0" # x-release-please-version
4
+ __version__ = "0.205.1" # x-release-please-version
@@ -1,8 +1,9 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Union
4
- from typing_extensions import TypeAlias
4
+ from typing_extensions import Annotated, TypeAlias
5
5
 
6
+ from .._utils import PropertyInfo
6
7
  from .outbound_email_opened_webhook_event import OutboundEmailOpenedWebhookEvent
7
8
  from .inbound_email_received_webhook_event import InboundEmailReceivedWebhookEvent
8
9
  from .outbound_email_bounced_webhook_event import OutboundEmailBouncedWebhookEvent
@@ -13,12 +14,15 @@ from .outbound_email_complained_webhook_event import OutboundEmailComplainedWebh
13
14
 
14
15
  __all__ = ["UnwrapWebhookEvent"]
15
16
 
16
- UnwrapWebhookEvent: TypeAlias = Union[
17
- InboundEmailReceivedWebhookEvent,
18
- OutboundEmailDeliveredWebhookEvent,
19
- OutboundEmailBouncedWebhookEvent,
20
- OutboundEmailComplainedWebhookEvent,
21
- OutboundEmailRejectedWebhookEvent,
22
- OutboundEmailOpenedWebhookEvent,
23
- OutboundEmailClickedWebhookEvent,
17
+ UnwrapWebhookEvent: TypeAlias = Annotated[
18
+ Union[
19
+ InboundEmailReceivedWebhookEvent,
20
+ OutboundEmailDeliveredWebhookEvent,
21
+ OutboundEmailBouncedWebhookEvent,
22
+ OutboundEmailComplainedWebhookEvent,
23
+ OutboundEmailRejectedWebhookEvent,
24
+ OutboundEmailOpenedWebhookEvent,
25
+ OutboundEmailClickedWebhookEvent,
26
+ ],
27
+ PropertyInfo(discriminator="event"),
24
28
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aiinbx
3
- Version: 0.187.0
3
+ Version: 0.205.1
4
4
  Summary: The official Python library for the AIInbx API
5
5
  Project-URL: Homepage, https://github.com/aiinbx/aiinbx-py
6
6
  Project-URL: Repository, https://github.com/aiinbx/aiinbx-py
@@ -114,6 +114,7 @@ pip install aiinbx[aiohttp]
114
114
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
115
115
 
116
116
  ```python
117
+ import os
117
118
  import asyncio
118
119
  from aiinbx import DefaultAioHttpClient
119
120
  from aiinbx import AsyncAIInbx
@@ -121,7 +122,7 @@ from aiinbx import AsyncAIInbx
121
122
 
122
123
  async def main() -> None:
123
124
  async with AsyncAIInbx(
124
- api_key="My API Key",
125
+ api_key=os.environ.get("AI_INBX_API_KEY"), # This is the default and can be omitted
125
126
  http_client=DefaultAioHttpClient(),
126
127
  ) as client:
127
128
  response = await client.threads.search()
@@ -10,8 +10,8 @@ aiinbx/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  aiinbx/_resource.py,sha256=R_-4UEtw4XqdaVP9kNZE-XgrsuRBrQeFB0x4vbgWM_k,1100
11
11
  aiinbx/_response.py,sha256=bN_uhJdOtEIu7WonnaRndk73_0N7bpUqEqUx_rZUxH8,28788
12
12
  aiinbx/_streaming.py,sha256=7AWeXwBPMgZiPlU6Z5quvQqDqHDkkt9j38z5L0CBk50,10221
13
- aiinbx/_types.py,sha256=k1TfzLVNmuxwSkopIgy03zuljyVxSEiekHlbSzCR9U0,7236
14
- aiinbx/_version.py,sha256=pPxh6wkM5-PlrU3mmFs-9maIT7Z6H7_nY1XpPdN0GcM,160
13
+ aiinbx/_types.py,sha256=LZpO7LB3Jw41PC06Kop69F0oo8jXulYKCOylxrlYkis,7295
14
+ aiinbx/_version.py,sha256=MG1xerRimzf0L1alW1Px_47M5w1fFXBAfCmrpUjQwD4,160
15
15
  aiinbx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  aiinbx/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  aiinbx/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -57,8 +57,8 @@ aiinbx/types/thread_forward_response.py,sha256=DmxnVB38C3R-fsNURfKMf5chNbKamQcx_
57
57
  aiinbx/types/thread_retrieve_response.py,sha256=s5jj2iwBfcoVPeybIOJUVwRhvnc_0NdEMcbDGJnheEw,2364
58
58
  aiinbx/types/thread_search_params.py,sha256=ZvlTTw4b_swhuC0VoLnU2QI1hYjROiEAyJ4HJXCrR9M,1939
59
59
  aiinbx/types/thread_search_response.py,sha256=lldugJNQuQ5tsD9BrgxoDNojAYs7Ks8iZDMxwhnjogY,908
60
- aiinbx/types/unwrap_webhook_event.py,sha256=6Hp4c5iHNs2lw3DYgRrgvRFBOmms0NADJ5XExEZrICI,1091
61
- aiinbx-0.187.0.dist-info/METADATA,sha256=2icYggyLPqcA7eSJQALcJiyVSkvC7BlfyZCvW38OsIA,13209
62
- aiinbx-0.187.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
- aiinbx-0.187.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
64
- aiinbx-0.187.0.dist-info/RECORD,,
60
+ aiinbx/types/unwrap_webhook_event.py,sha256=70k2BARL8N22tVhpaFHOXknzr1hnCjKfTssZxY7HLF4,1227
61
+ aiinbx-0.205.1.dist-info/METADATA,sha256=yeu8qKGWFbZ3CyfFlNkUlnAPUfLhHXFxJfdS4jqjQ1A,13282
62
+ aiinbx-0.205.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
+ aiinbx-0.205.1.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
64
+ aiinbx-0.205.1.dist-info/RECORD,,