Metadata-Version: 2.1
Name: py-message-listener
Version: 0.1
Summary: sqs message listener using boto3
License: MIT
Author: Raju Komati
Author-email: komatiraju032@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: boto3 (>=1.24.7,<2.0.0)
Description-Content-Type: text/markdown

# message-listener

This module can be used for listening to the messages from aws sqs.

### Requirements

1. install module `pip install py-message-listener`

Follow bellow steps for using this module

1. Add `@Listener` decorator to method or function where do you want to recieve the message, for that method/function
   add single parameter, This parameter is set whenever the message is recieved and method will be called and message
   will be passed as argument.
2. In decorator pass queue name in `destination`   argument
3. set these environment variables: `AWS_REGION`, `AWS_ACCOUNT_ID`, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`

> `AWS_ACCOUNT_ID` this will be used for generating the queue url

#### Sample Code

```python
from listener import Listener


@Listener(destination='test.fifo')
def fun(msg: str):
    print(msg)
```

