Initial commit: Python email notification API

- Flask-based email API for manufacturing notifications
- SMTP integration with configurable settings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-30 13:15:05 -05:00
commit 5faf8817de
4 changed files with 374 additions and 0 deletions

31
start.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Start the Email API service
#
# Required environment variables:
# SMTP_HOST - SMTP server hostname
# SMTP_USER - SMTP username
# SMTP_PASS - SMTP password
#
# Optional:
# SMTP_PORT - SMTP port (default: 587)
# SMTP_FROM - Default from address
# API_KEY - API key for authentication
# DB_HOST - MySQL host (default: 192.168.122.1)
# DB_USER - MySQL user (default: 570005354)
# DB_PASS - MySQL password
cd "$(dirname "$0")"
# Check for virtual environment
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
else
source venv/bin/activate
fi
# Start the API
echo "Starting Email API on port 5000..."
python app.py