Board summary for engagements in Carrier. This script generates a status report from a carrier platform and sends it via email. It interacts with the Carrier API to fetch tickets and audit logs, categorizes the tickets, and sends a summary report through email.
- Features
- Requirements
- Installation
- Usage
- Configuration
- Error Handling
- Logging
- Testing
- Contributing
- License
- Fetches tickets from the Carrier API.
- Categorizes tickets into different statuses.
- Fetches audit logs to identify recently completed tickets.
- Generates an HTML report using Jinja2 templates.
- Sends the report via email using SMTP.
- Python 3.7+
requests
libraryjinja2
librarysmtplib
library
-
Clone the repository:
git clone https://github.com/yourusername/board_summaryt.git cd board_summaryt
-
Install the required Python packages:
pip install -r requirements.txt
To run the script locally, you can use the handler_local
function. This function is intended for local debugging and testing.
from script import handler_local
event = {
"base_url": "https://api.example.com",
"token": "your_token_here",
"project_id": "your_project_id_here",
"board_id": "your_board_id_here",
"host": "smtp.example.com",
"port": 465,
"user": "your_user_here",
"passwd": "your_password_here",
"sender": "[email protected]",
"recipients": "[email protected]"
}
response = handler_local(event)
print(response)