All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Explicit HTTP connection pool configuration (CHA-2956). Four new kwargs on
Stream(...)andAsyncStream(...):max_conns_per_host: int: default5idle_timeout: float(seconds): default55.0connect_timeout: float(seconds): default10.0request_timeout: float(seconds): default30.0(was6.0; see Behavior changes)
These tune the underlying
httpx.Limitsandhttpx.Timeout. The existinghttp_client=andtransport=kwargs continue to act as escape hatches; whenhttp_clientis set, none of the four new kwargs apply. Env-var fallbacks for the new kwargs:STREAM_MAX_CONNS_PER_HOST,STREAM_IDLE_TIMEOUT,STREAM_CONNECT_TIMEOUT,STREAM_REQUEST_TIMEOUT. -
INFO log on client construction (logger
getstream) lists the effective pool config and whether a user-suppliedhttp_clientis in use. -
Webhook handling spec helpers (CHA-2961):
UnknownEventdataclass for forward-compat;gunzip_payload,decode_sqs_payload,decode_sns_payloadprimitives;parse_event(returns typed event orUnknownEventfor unrecognized discriminators);verify_signaturecanonical alias ofverify_webhook_signature;verify_and_parse_webhookHTTP composite (gunzip + verify + parse);parse_sqsandparse_snsqueue composites (no signature parameter: queue transports are authenticated by AWS IAM, so the backend emits no HMAC for queue messages today). Transparent gzip via magic-byte detection. -
New instance methods on
StreamandAsyncStream:verify_signature(body, signature)andverify_and_parse_webhook(body, signature)that drop the api_secret parameter in favor of the client's stored secret. Dual API: the module-level functions ingetstream.webhookremain available for callers who want explicit secret control. -
New instance methods on
Stream/AsyncStream:parse_sqs(message_body),parse_sns(notification_body)(no signature; AWS IAM). -
InvalidWebhookErrorexception type covering both signature mismatches and malformed payloads. Distinguish failure modes via the exception message or__cause__chain. -
Conformance fixture suite under
tests/fixtures/webhooks/(13 happy-path event directories + 8 negative cases) for SDK conformance testing across language ports.
- Default
request_timeoutis now30.0seconds (was6.0). Aligns stream-py with the cross-SDK contract in CHA-2956. Existing callers usingtimeout=are unaffected;timeoutis kept as an alias forrequest_timeout. Callers relying on the 6s ceiling for fail-fast behavior should passrequest_timeout=6.0(ortimeout=6.0) explicitly. - Default HTTP transport now caps connections per host at
5and closes idle sockets after55.0s. Previous default was httpx's100max-connections with5.0skeep-alive expiry. - No breaking changes. All existing webhook helpers (
verify_webhook_signature,parse_webhook_event,get_event_type, event type constants) are preserved.
- Per-call
timeout=httpx.Timeout(...)continues to work through.get(...),.post(...), etc., and pre-empts the client-levelrequest_timeout.
- Type names across all products now follow the OpenAPI spec naming convention: response types are suffixed with
Response, input types withRequest. See MIGRATION_v2_to_v3.md for the complete rename mapping. Event(WebSocket envelope type) renamed toWSEvent. Base event type renamed fromBaseEventtoEvent(with fieldtypeinstead ofT).- Event composition changed from monolithic
*Presetembeds to modularHas*types. Pagerrenamed toPagerResponseand migrated from offset-based to cursor-based pagination (next/prevtokens).- Types that were previously
dictorTypedDict(e.g.,User,Channel,Message) are now full dataclasses with typed fields.
- Full product coverage: Chat, Video, Moderation, and Feeds APIs are all supported in a single SDK.
- Feeds: activities, feeds, feed groups, follows, comments, reactions, collections, bookmarks, membership levels, feed views, and more.
- Video: calls, recordings, transcription, closed captions, SFU, call statistics, user feedback analytics, and more.
- Moderation: flags, review queue, moderation rules, config, appeals, moderation logs, and more.
- Push notification types, preferences, and templates.
- Webhook support:
WHEventenvelope class for receiving webhook payloads, utility functions for decoding and verifying webhook signatures, and a full set of individual typed event dataclasses for every event across all products (Chat, Video, Moderation, Feeds) usable as discriminated event types. - Cursor-based pagination across all list endpoints.