Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public final class SmithyPythonDependency {
/**
* EventStream implementations for application/vnd.amazon.eventstream.
*/
public static final PythonDependency AWS_EVENT_STREAM = new PythonDependency(
"aws_event_stream",
public static final PythonDependency SMITHY_AWS_EVENT_STREAM = new PythonDependency(
"smithy_aws_event_stream",
"==0.0.1",
Type.DEPENDENCY,
false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ protected void resolveErrorCodeAndMessage(
@Override
public void wrapInputStream(GenerationContext context, PythonWriter writer) {
writer.addDependency(SmithyPythonDependency.SMITHY_JSON);
writer.addDependency(SmithyPythonDependency.AWS_EVENT_STREAM);
writer.addDependency(SmithyPythonDependency.SMITHY_AWS_EVENT_STREAM);
writer.addImport("smithy_json", "JSONCodec");
writer.addImport("smithy_core.aio.types", "AsyncBytesReader");
writer.addImport("smithy_core.types", "TimestampFormat");
writer.addImport("aws_event_stream.aio", "AWSEventPublisher");
writer.addImport("smithy_aws_event_stream.aio", "AWSEventPublisher");
writer.addImport("aws_sdk_signers", "AsyncEventSigner");
writer.write(
"""
Expand All @@ -437,11 +437,11 @@ public void wrapInputStream(GenerationContext context, PythonWriter writer) {
@Override
public void wrapOutputStream(GenerationContext context, PythonWriter writer) {
writer.addDependency(SmithyPythonDependency.SMITHY_JSON);
writer.addDependency(SmithyPythonDependency.AWS_EVENT_STREAM);
writer.addDependency(SmithyPythonDependency.SMITHY_AWS_EVENT_STREAM);
writer.addImport("smithy_json", "JSONCodec");
writer.addImport("smithy_core.aio.types", "AsyncBytesReader");
writer.addImport("smithy_core.types", "TimestampFormat");
writer.addImport("aws_event_stream.aio", "AWSEventReceiver");
writer.addImport("smithy_aws_event_stream.aio", "AWSEventReceiver");
writer.write(
"""
codec = JSONCodec(default_timestamp_format=TimestampFormat.EPOCH_SECONDS)
Expand Down
4 changes: 4 additions & 0 deletions packages/smithy-aws-event-stream/CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Unreleased
### Features
* Added basic support for the [Amazon Event Stream](https://smithy.io/2.0/aws/amazon-eventstream.html) specification.
* Added support for unidirectdional and bidirectional event streams.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "aws-event-stream"
name = "smithy-aws-event-stream"
version = "0.0.1"
description = "Core Smithy components for AWS services and protocols."
description = "Smithy components for Amazon Event Streams."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

import importlib.metadata

__version__: str = importlib.metadata.version("aws-event-stream")
__version__: str = importlib.metadata.version("smithy-aws-event-stream")
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import dataclass
from typing import Any, ClassVar, Literal, Self

from aws_event_stream.events import Byte, EventMessage, Long, Short
from smithy_aws_event_stream.events import Byte, EventMessage, Long, Short
from smithy_core.deserializers import ShapeDeserializer
from smithy_core.exceptions import SmithyException
from smithy_core.prelude import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from typing import Any

import pytest
from aws_event_stream._private.deserializers import EventDeserializer
from aws_event_stream.aio import AWSEventReceiver
from aws_event_stream.events import Event, EventMessage
from aws_event_stream.exceptions import UnmodeledEventError
from smithy_aws_event_stream._private.deserializers import EventDeserializer
from smithy_aws_event_stream.aio import AWSEventReceiver
from smithy_aws_event_stream.events import Event, EventMessage
from smithy_aws_event_stream.exceptions import UnmodeledEventError
from smithy_core.aio.types import AsyncBytesReader
from smithy_core.deserializers import DeserializeableShape
from smithy_json import JSONCodec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from typing import Any

import pytest
from aws_event_stream._private.serializers import EventSerializer
from aws_event_stream.aio import AWSEventPublisher
from aws_event_stream.events import EventMessage
from smithy_aws_event_stream._private.serializers import EventSerializer
from smithy_aws_event_stream.aio import AWSEventPublisher
from smithy_aws_event_stream.events import EventMessage
from smithy_core.aio.types import AsyncBytesProvider
from smithy_core.serializers import SerializeableShape
from smithy_json import JSONCodec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from io import BytesIO

import pytest
from aws_event_stream.events import (
from smithy_aws_event_stream.events import (
MAX_HEADER_VALUE_BYTE_LENGTH,
MAX_HEADERS_LENGTH,
MAX_PAYLOAD_LENGTH,
Expand All @@ -19,8 +19,8 @@
Long,
Short,
)
from aws_event_stream.events import _EventEncoder as EventEncoder
from aws_event_stream.exceptions import (
from smithy_aws_event_stream.events import _EventEncoder as EventEncoder
from smithy_aws_event_stream.exceptions import (
ChecksumMismatch,
DuplicateHeader,
InvalidEventBytes,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ smithy_core = { workspace = true }
smithy_http = { workspace = true }
smithy_json = { workspace = true }
smithy_aws_core = { workspace = true }
aws_event_stream = { workspace = true }
smithy_aws_event_stream = { workspace = true }
aws_sdk_signers = {workspace = true }

[tool.pyright]
Expand Down