Metadata-Version: 2.1
Name: kaftar
Version: 0.0.6
Summary: a simple sdk to send notifications on queue for celery tasks
Author-email: Amirreza Taherkhani <amirrezataherkhaani@gmail.com>
Project-URL: Homepage, https://github.com/pypa/sampleproject
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: celery ==5.3.1

# Kaftar SDK

## Usage

Package installation

``` bash
pip install kaftar
```

Usage:

``` python
import uuid
from kaftar import Notification


app = Notification('app_name')
message_uuid = uuid.uuid4()
recipients = [
    {
        'receiver': "076f08cc-4122-400a-bffa-2a0157ba57eb",  # can be email or phone number
        'message_uuid': str(message_uuid),
        'uuid': "076f08cc-4122-400a-bffa-2a0157ba57eb"
    }
]

app.send_notification(
    {
        'subject': 'Course updated222',
        'content': 'Course is available now'
    },
    [
        {
            'receiver': "076f08cc-4122-400a-bffa-2a0157ba57eb",  # can be email or phone number
            'message_uuid': str(message_uuid),
            'uuid': "076f08cc-4122-400a-bffa-2a0157ba57eb"
        }
    ],
    int(time.time()),
    group_uuid=uuid.uuid4() # Optional
)

```
