feat: add Amazon SES backend with SigV4 byte-stable signing#22
Merged
Conversation
- Deleted the following command files as they are no longer needed: - bootstrap.md - explore.md - fix-issue.md - implement.md - prd.md - review.md - test.md - Removed the MCP strategy file as it is outdated. - Deleted the README for the Litestar skill to streamline documentation. - Updated .gitignore to include new patterns for Beads and Dolt files.
Stop tracking CLAUDE.md in version control and add CLAUDE.md and GEMINI.md to .gitignore so per-agent context files stay local.
Regenerate uv.lock and bump pre-commit hooks via make upgrade: conventional-pre-commit v4.3.0 -> v4.4.0, ruff-pre-commit v0.14.10 -> v0.15.12, codespell v2.4.1 -> v2.4.2.
- Introduced SESBackend for sending emails via Amazon SES API v2. - Added SES configuration options including region and AWS credentials. - Updated documentation to include SES installation and usage instructions. - Enhanced transport classes to support raw byte content for signed requests. - Implemented tests for SES backend functionality, including error handling for rate limits and authentication issues.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
- Coverage 88.57% 88.10% -0.47%
==========================================
Files 21 24 +3
Lines 928 1068 +140
Branches 143 168 +25
==========================================
+ Hits 822 941 +119
- Misses 71 85 +14
- Partials 35 42 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a native Amazon SES backend (API v2) to
litestar-email, alongside a small refactor that splits the backend/transport__init__.pyfiles into pure re-export façades.SESBackend+SESConfig(region,aws_access_key_id,aws_secret_access_key,aws_session_token,timeout,http_transport).botocoreis an optional dep — install viapip install litestar-email[ses]. No core deps added.botocore.auth.SigV4Auth. Body bytes are pre-serialized once and used verbatim for both signing and transmission, sohttpx's compact-separator JSON re-serialization can't invalidatex-amz-content-sha256.HTTPTransport.postgained an additivecontent: bytes | Noneparameter (httpx + aiohttp impls plumbed through). Backward-compatible.EmailRateLimitError(retry_after), 403 →EmailAuthenticationError, other 4xx →EmailDeliveryError.Rawcontent) and empty-body messages are rejected loudly rather than silently dropped.register_backend→email_backend(clearer for custom backend authors). Backend factory moved tobackends/factory.py, transport factory totransports/factory.py.__init__.pyfiles are now pure re-exports — RUF067 satisfied without suppression.SESBackend/SESConfiglifted to top-levellitestar_emailre-exports.docs/usage/backends.rst,docs/usage/quickstart.rst,docs/reference/api.rst,README.md.