Get gnr-async-notification-service running in 5 minutes.
pip install -r requirements.txtcp example_config.ini config.ini
# Edit config.ini - set your api_tokenMinimal config:
[server]
port = 8002
[notification]
api_token = my-secret-token
db_path = /tmp/notifications.db
[default_account]
provider = mockpython main.pyOr with Docker:
docker build -t notification-service .
docker run -p 8002:8002 -v $(pwd)/config.ini:/app/config.ini notification-serviceCheck health:
curl http://localhost:8002/statusSend a test SMS:
curl -X POST http://localhost:8002/commands/add-notifications \
-H "X-API-Token: my-secret-token" \
-H "Content-Type: application/json" \
-d '{
"notifications": [{
"id": "test-001",
"type": "sms",
"payload": {
"phone": "+393331234567",
"message": "Test SMS"
}
}]
}'Or use the example client:
# Edit example_client.py with your api_token
python example_client.pycurl http://localhost:8002/metrics -H "X-API-Token: my-secret-token"- Read the full documentation
- Add a real provider (AWS SNS, Twilio, etc.)
- Configure delivery reports
- Set up Prometheus monitoring
- Deploy to production
Service won't start:
- Check Python version (3.11+ required)
- Verify config.ini is valid
- Check port 8002 is available
Notifications not sending:
- Run:
curl -X POST http://localhost:8002/commands/run-now -H "X-API-Token: ..." - Check logs for errors
- Verify provider configuration
Need help?
- See documentation
- Check GitHub issues
- Email: info@softwell.it