Metadata-Version: 2.1
Name: sendinblue-logger
Version: 1.0.0
Summary: Send log messages to sendinblue's transactional email service.
Home-page: https://github.com/calwarhurst/sendinblue-logger
License: MIT
Author: Cal Warhurst
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: requests (>=2.28.1,<3.0.0)
Project-URL: Repository, https://github.com/calwarhurst/sendinblue-logger
Description-Content-Type: text/markdown

## Description
This is a logging handler for Python's [logging](https://docs.python.org/3/library/logging.html) module to send log messages over [sendinblue](https://www.sendinblue.com/)'s transactional email service.

## Installation
```shell
$ pip install sendinblue-logger
```

## Usage
```python
import sblue
import logging
import os

handler = sblue.LoggingHandler(
    level=logging.ERROR,
    api_key=os.getenv('SENDINBLUE_API_KEY'),
    from_email='sender-email@domain.com',
    to_email='recipient-email@domain.com',
)

logging.basicConfig(
    filename='/home/user/project/project.log', 
    encoding='utf-8', 
    level=logging.DEBUG, 
    format='%(asctime)s - %(levelname)s: %(message)s',
    handlers=(handler,)
)
```
