Skip to main content

finalsa SNS client

Lightweight AWS SNS client for Python with:

  • Topic discovery/creation and basic subscription helpers
  • Single and batch message publishing
  • Default W3C trace headers and produced-at timestamp on messages
  • Minimal test client for local/testing (SnsClientTest)

Install

Requires Python 3.10+.

uv add finalsa-sns-client

Quick start

from finalsa.sns.client import SnsClientImpl

client = SnsClientImpl()

# Ensure a topic exists
client.get_or_create_topic("orders")

# Publish a string payload
client.publish("orders", "hello world")

# Publish a dict payload with default trace headers
client.publish_message("orders", {"id": 1, "status": "created"})

# Publish in batch (up to 10 per batch)
client.publish_messages_batch("orders", [{"id": i} for i in range(5)])

Testing locally

Use the in-memory client:

from finalsa.sns.client import SnsClientTest

client = SnsClientTest()
client.publish_message("test", {"ok": True})
assert client.messages("test")[0] == {"ok": True}

Run tests:

uv run -m pytest -q

License

MIT

Release files for finalsa-sns-client 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finalsa-sns-client 2.2.1
File Size Uploaded
finalsa_sns_client-2.2.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for finalsa-sns-client 2.2.1
File Interpreter ABI Platform
finalsa_sns_client-2.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / finalsa_sns_client-2.2.1.tar.gz

Download URL finalsa_sns_client-2.2.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1021d9c5682525092ffa60d42472239466d99914d79b5e770114396ba4fbbee9
BLAKE2b-256 checksum
How to use checksums
01563f958e0eb980b3ac7d1aa1ca1242df239c5caa2b0ded971e388155d868d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.12

Release files / finalsa_sns_client-2.2.1-py3-none-any.whl

Download URL finalsa_sns_client-2.2.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0a46548e656a363b0bcae2ab8e286eb018a05b93ee95ecba147be208b192833
BLAKE2b-256 checksum
How to use checksums
09e11cbe3b0af419f98f7bd757155790d948a859c9804f8f483f5db7b8de0154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.12

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page