Registry /
aws / smithy-aws-event-stream
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ build_error
py 3.11
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
13MB installed
● package 13MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EventStreamMessage
✓ from smithy_aws_event_stream import EventStreamMessage
✗ from smithy_aws_event_stream import EventStreamMessage
This quickstart demonstrates how to construct a basic `EventStreamMessage` using the library's data models. This message can then be serialized and sent over an event stream, typically within the context of an AWS client generated by `smithy-python`.
from smithy_aws_event_stream.model import EventStreamMessage, EventStreamHeader, EventStreamHeaderValue
# 1. Create headers for the event stream message
headers = [
EventStreamHeader(name=":message-type", value=EventStreamHeaderValue.string("event")),
EventStreamHeader(name=":event-type", value=EventStreamHeaderValue.string("MyApplicationEvent")),
EventStreamHeader(name="correlation-id", value=EventStreamHeaderValue.uuid("a1b2c3d4-e5f6-7890-1234-567890abcdef")),
EventStreamHeader(name="is-urgent", value=EventStreamHeaderValue.boolean(True)),
EventStreamHeader(name="sequence-number", value=EventStreamHeaderValue.int64(1))
]
# 2. Define the payload (can be empty or any bytes)
payload = b'{"data": "This is my event payload!"}'
# 3. Create an EventStreamMessage instance
message = EventStreamMessage(headers=headers, payload=payload)
print("Created Event Stream Message:")
print(f" Payload: {message.payload.decode('utf-8')}")
print(" Headers:")
for header in message.headers:
# Using to_python() to get the native Python value from EventStreamHeaderValue
print(f" - {header.name}: {header.value.to_python()}")
# In a real-world scenario, this message would typically be serialized
# by an EventStreamSerde instance (part of an AWS client generated by smithy-python)
# and sent over an asynchronous stream to an AWS service.
Debug
Known issues
breakingAs a pre-1.0 library (0.x.x versioning), API stability is not guaranteed. Expect breaking changes between minor versions (e.g., 0.1.x to 0.2.x) as the library evolves.fixAlways refer to the latest `CHANGELOG.md` in the `smithy-python` repository and pin your dependencies to specific versions to mitigate unexpected breakage.
affects: <1.0.0
gotchaThis library requires Python 3.12 or higher. Attempting to install or run it on older Python versions will result in dependency resolution failures or runtime errors.fixEnsure your development and deployment environments are running Python 3.12 or a newer compatible version.
affects: <0.1.0 to current
gotchaThe library is designed for asynchronous I/O and heavily uses async iterators/generators for handling event streams. Incorrect handling of asynchronous patterns (e.g., missing `await`, improper loop management) can lead to unexpected behavior, resource leaks, or deadlocks.fixFamiliarize yourself with Python's `asyncio` and `async`/`await` patterns. Always use `async for` when iterating over `EventStreamSerde` or similar async iterators, and properly `await` async functions.
affects: <0.1.0 to current
Upgrade
Version history
0.3.0latest on PyPI · released May 5, 2026
Audit
Dependencies
aws-eventstreamrequiredCore dependency for low-level event stream protocol handling.
aws-checksumsrequiredUsed for calculating and verifying event stream checksums.
smithy-pythonrequiredPrimary framework dependency providing base types, interfaces, and integration points for Smithy clients and services.