Metadata-Version: 2.1
Name: listmonk-api
Version: 0.1.2
Summary: Listmonk API Python Wrapper
Home-page: https://github.com/Knuckles-Team/listmonk-api
Author: Audel Rouhi
Author-email: knucklessg1@gmail.com
License: Unlicense
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: Public Domain
Classifier: Environment :: Console
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests (>=2.28.1)
Requires-Dist: urllib3 (>=1.26.13)

# Listmonk API
*Version: 0.1.2*

Listmonk API Python Wrapper

This repository is actively maintained and will continue adding more API calls

### API Calls:
- Subscribers
- Lists
- Import
- Campaigns
- Media
- Templates
- Transactional

### Usage:

```python
#!/usr/bin/python
# coding: utf-8
import listmonk_api

username = "<LISTMONK USERNAME>"
password = "<LISTMONK_PASSWORD>"
listmonk_api_url = "<LISTMONK_URL>"
client = listmonk_api.Api(url=listmonk_api_url, username=username, password=password)

lists = client.get_lists()
print(f"Lists: {lists}")

created_list = client.create_list(name="EXAMPLE TEMPLATE", type="<public/private>", optin="<single/double>", tags=['<LIST TAG>'])
print(f"Created List: {created_list}")

created_campaign = client.create_campaign(name="EXAMPLE TEMPLATE", type="<public/private>", optin="<single/double>", tags=['<LIST TAG>'])
print(f"Created Campaign: {created_campaign}")

print(f"Subscribers: {client.get_subscribers()}")

print(f"Campaigns: {client.get_campaigns()}")
```

#### Install Instructions
Install Python Package

```bash
python -m pip install listmonk-api
```

#### Build Instructions
Build Python Package

```bash
sudo chmod +x ./*.py
pip install .
python setup.py bdist_wheel --universal
# Test Pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose -u "Username" -p "Password"
# Prod Pypi
twine upload dist/* --verbose -u "Username" -p "Password"
```


