Skip to main content

Publish message into SNS Topic with attributes

Project description

Actions Status Python 3.7 PyPI version License: MIT Language grade: Python Twitter Follow

Publish Data Event to SNS Topic

This package helps you to publish a dict object as JSON into SNS Topic, including fields as attributes

pip install publish-event-sns
from publish_event_sns import publish


my_dict = {
    "foo": "bar"
}

response = publish("topic_name", my_dict)

This code will transform DICT into JSON and publish into SNS Topic with foo as attribute as bar value.

publish function will automaticaly exclude from attributes non primitive values (dict, object, etc)

Parameters

Some aditional configuration is possible while publishing event:

  • region_name: Region name to use in internal boto3 client;
  • session: If you need to provide a existing boto3 session
  • attr_exclude: A list of fields to force exclusion while including fields as attributes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

publish_event_sns-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

publish_event_sns-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file publish_event_sns-0.0.2.tar.gz.

File metadata

  • Download URL: publish_event_sns-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5

File hashes

Hashes for publish_event_sns-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0a3edd4d1491ffa3b6480a2aafb35ce2451d3ec30c010eddc7fa5c61683e6d31
MD5 90dd355e8289b1d058a114366199de2a
BLAKE2b-256 8d22fadd2fe50dfa0a8c952f157ad4f53fe5c9a5c6653a82d54ca71d4407d7d8

See more details on using hashes here.

File details

Details for the file publish_event_sns-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: publish_event_sns-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5

File hashes

Hashes for publish_event_sns-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bff156713b402c0cb803eba3e64f34c98efe54a32dac11a86053e72fcced973f
MD5 764bd15c2b9a79321c15dedc80294c07
BLAKE2b-256 688f4b55a6044b9fa3eec6e6d864571f3869c1a65f9d2bfa7101f99771af1ca5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page