finalsa-sns-client


Namefinalsa-sns-client JSON
Version 2.2.1 PyPI version JSON
download
home_pageNone
SummaryLightweight AWS SNS client for Python with topic management, subscriptions, and single/batch publishing with W3C trace headers.
upload_time2025-08-19 02:12:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Luis Diego Jiménez Delgado Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords aws boto3 finalsa messaging pubsub pydantic sns traceability
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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+.

```bash
uv add finalsa-sns-client
```

## Quick start

```python
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:

```python
from finalsa.sns.client import SnsClientTest

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

Run tests:

```bash
uv run -m pytest -q
```

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "finalsa-sns-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "aws, boto3, finalsa, messaging, pubsub, pydantic, sns, traceability",
    "author": null,
    "author_email": "Luis Jimenez <luis@finalsa.com>",
    "download_url": "https://files.pythonhosted.org/packages/01/56/3f958e0eb980b3ac7d1aa1ca1242df239c5caa2b0ded971e388155d868d0/finalsa_sns_client-2.2.1.tar.gz",
    "platform": null,
    "description": "# finalsa SNS client\n\nLightweight AWS SNS client for Python with:\n\n- Topic discovery/creation and basic subscription helpers\n- Single and batch message publishing\n- Default W3C trace headers and produced-at timestamp on messages\n- Minimal test client for local/testing (`SnsClientTest`)\n\n## Install\n\nRequires Python 3.10+.\n\n```bash\nuv add finalsa-sns-client\n```\n\n## Quick start\n\n```python\nfrom finalsa.sns.client import SnsClientImpl\n\nclient = SnsClientImpl()\n\n# Ensure a topic exists\nclient.get_or_create_topic(\"orders\")\n\n# Publish a string payload\nclient.publish(\"orders\", \"hello world\")\n\n# Publish a dict payload with default trace headers\nclient.publish_message(\"orders\", {\"id\": 1, \"status\": \"created\"})\n\n# Publish in batch (up to 10 per batch)\nclient.publish_messages_batch(\"orders\", [{\"id\": i} for i in range(5)])\n```\n\n## Testing locally\n\nUse the in-memory client:\n\n```python\nfrom finalsa.sns.client import SnsClientTest\n\nclient = SnsClientTest()\nclient.publish_message(\"test\", {\"ok\": True})\nassert client.messages(\"test\")[0] == {\"ok\": True}\n```\n\nRun tests:\n\n```bash\nuv run -m pytest -q\n```\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2025 Luis Diego Jim\u00e9nez Delgado  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Lightweight AWS SNS client for Python with topic management, subscriptions, and single/batch publishing with W3C trace headers.",
    "version": "2.2.1",
    "project_urls": {
        "Homepage": "https://github.com/finalsa/sns-client"
    },
    "split_keywords": [
        "aws",
        " boto3",
        " finalsa",
        " messaging",
        " pubsub",
        " pydantic",
        " sns",
        " traceability"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "09e11cbe3b0af419f98f7bd757155790d948a859c9804f8f483f5db7b8de0154",
                "md5": "741af78c78aa93790cda102ade919879",
                "sha256": "d0a46548e656a363b0bcae2ab8e286eb018a05b93ee95ecba147be208b192833"
            },
            "downloads": -1,
            "filename": "finalsa_sns_client-2.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "741af78c78aa93790cda102ade919879",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8030,
            "upload_time": "2025-08-19T02:11:59",
            "upload_time_iso_8601": "2025-08-19T02:11:59.850059Z",
            "url": "https://files.pythonhosted.org/packages/09/e1/1cbe3b0af419f98f7bd757155790d948a859c9804f8f483f5db7b8de0154/finalsa_sns_client-2.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "01563f958e0eb980b3ac7d1aa1ca1242df239c5caa2b0ded971e388155d868d0",
                "md5": "9929d4542de35aa0110acfeef01adb4c",
                "sha256": "1021d9c5682525092ffa60d42472239466d99914d79b5e770114396ba4fbbee9"
            },
            "downloads": -1,
            "filename": "finalsa_sns_client-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9929d4542de35aa0110acfeef01adb4c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5698,
            "upload_time": "2025-08-19T02:12:00",
            "upload_time_iso_8601": "2025-08-19T02:12:00.908178Z",
            "url": "https://files.pythonhosted.org/packages/01/56/3f958e0eb980b3ac7d1aa1ca1242df239c5caa2b0ded971e388155d868d0/finalsa_sns_client-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-19 02:12:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "finalsa",
    "github_project": "sns-client",
    "github_not_found": true,
    "lcname": "finalsa-sns-client"
}
        
Elapsed time: 1.48568s