Metadata-Version: 2.1
Name: sendbee-api
Version: 0.1.0.dev0
Summary: Python client SDK for Sendbee Public API
Home-page: https://github.com/sendbee/sendbee-python-client
Author: Sendbee ltd
Author-email: info@sendbee.io
License: MIT
Project-URL: Source, https://github.com/sendbee/sendbee-python-client
Keywords: sendbee api python
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
Requires-Dist: click (>=7.0)
Requires-Dist: requests (>=2.20.0)
Requires-Dist: dumpit (>=0.5.0)
Requires-Dist: aenum (>=2.1.2)
Requires-Dist: ujson (==1.35)
Requires-Dist: cryptography (==2.8)

```
 _______ _______ __   _ ______  ______  _______ _______      _______  _____  _____
 |______ |______ | \  | |     \ |_____] |______ |______      |_____| |_____]   |  
 ______| |______ |  \_| |_____/ |_____] |______ |______      |     | |       __|__

                .' '.            __
       .        .   .           (__\_
        .         .         . -{{_(|8)
          ' .  . ' ' .  . '     (__/
```

# Sendbee Python API Client  

## Installation  

```bash
> pip install sendbee_api  
# not on pypi right now, but will be 

```

## Usage  

### Initialization  

```python
from sendbee_api import SendbeeApi

api = SendbeeApi(
    '__your_api_key_here__', '__your_secret_key_here__',
    '__business_id_here__'
)
```

### Fetch contacts  

```python
contacts = api.contacts([tags=['...', ...]], [search_query='...'])

for contact in contacts:
    contact.id
    contact.name
    contact.phone
    contact.email
    contact.created_at
    contact.tags
```

### Subscribe contact  

```python
contact = api.subscribe_contact(phone='+...', [tags=['...', ...]])

contact.id
contact.name
contact.phone
contact.email
contact.created_at
contact.tags
```

### Fetch tags  

```python
tags = api.tags([name='...'])

for tag in tags:
    tag.id
    tag.name
```

### Create tag  

```python
tag = api.create_tag(name='...')

tag.id
tag.name
```

### Update tag  

```python
tag = api.update_tag(id='...', name='...')

tag.id
tag.name
```

### Delete tag  

```python
tag = api.delete_tag(id='...')
```

### Fetch message templates  

```python
templates = api.message_templates([search_query='...'])

for template in templates:
    template.id
    template.text
    template.tags
    template.keyword
    template.language
    template.approved
```

### Send template message  

```python
response = api.send_template_message(
    phone='+...', template_keyword='...', language='...', tags=['...', ...]
)

response.conversation_id
# save this id, and when you get sent message status requests on
# your webhook, you'll get this same id to identify the conversation

```


