Name | evolvishub-alerting JSON |
Version |
1.0.0
JSON |
| download |
home_page | https://github.com/evolvis-ai/evolvishub-alerting |
Summary | A comprehensive, professional asynchronous multi-channel alerting library for Python applications |
upload_time | 2025-07-19 10:22:20 |
maintainer | None |
docs_url | None |
author | Alban Maxhuni, PhD |
requires_python | >=3.8 |
license | COMMERCIAL LICENSE
EvolvisHub Alerting Library
Copyright (c) 2024 Evolvis AI (https://evolvis.ai)
Author: Alban Maxhuni, PhD (a.maxhuni@evolvis.ai)
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. DEFINITIONS
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean Evolvis AI, the copyright owner or entity authorized
by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control
with that entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source,
and configuration files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work.
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based upon (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as
a whole, an original work of authorship.
"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work.
2. GRANT OF COPYRIGHT LICENSE
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to use, reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and
such Derivative Works in Source or Object form.
3. GRANT OF PATENT LICENSE
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work.
4. REDISTRIBUTION
You may reproduce and distribute copies of the Work or Derivative Works
thereof in any medium, with or without modifications, and in Source or
Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a
copy of this License; and
(b) You must cause any modified files to carry prominent notices stating
that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file.
5. SUBMISSION OF CONTRIBUTIONS
Unless You explicitly state otherwise, any Contribution intentionally
submitted for inclusion in the Work by You to the Licensor shall be under
the terms and conditions of this License, without any additional terms or
conditions.
6. TRADEMARKS
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work.
7. DISCLAIMER OF WARRANTY
Unless required by applicable law or agreed to in writing, Licensor provides
the Work (and each Contributor provides its Contributions) on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions of
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
8. LIMITATION OF LIABILITY
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License
or out of the use or inability to use the Work.
9. ACCEPTING WARRANTY OR ADDITIONAL LIABILITY
When redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License.
END OF TERMS AND CONDITIONS
|
keywords |
alerting
monitoring
notifications
teams
email
slack
discord
sms
webhook
async
asyncio
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# EvolvisHub Alerting Library
[](https://badge.fury.io/py/evolvishub-alerting)
[](https://pepy.tech/project/evolvishub-alerting)
[](https://pepy.tech/project/evolvishub-alerting)
[](https://evolvis.ai/licenses/commercial-1.0)
[](https://www.python.org/downloads/)
A comprehensive, professional **asynchronous** multi-channel alerting library for Python applications. Send alerts and notifications through Microsoft Teams, Email, Slack, Discord, SMS, and custom webhooks with advanced features like filtering, rate limiting, and retry mechanisms.
**Author:** Alban Maxhuni, PhD (a.maxhuni@evolvis.ai)
**Company:** [Evolvis AI](https://evolvis.ai)
**License:** Commercial License
## π Features
- **π Fully Asynchronous**: Built with async/await for high performance and scalability
- **Multi-Channel Support**: Teams, Email, Slack, Discord, SMS (Twilio), Custom Webhooks
- **Multiple Configurations**: Support multiple channels of the same type (e.g., different Teams channels)
- **Alert Categories**: Software issues, Performance, Security, Business logic, Infrastructure, Data quality
- **Advanced Filtering**: Route alerts to specific channels based on level, category, or keywords
- **Rate Limiting**: Prevent spam with configurable rate limits per channel
- **Retry Mechanism**: Automatic retry with exponential backoff for failed deliveries
- **Multiple Config Formats**: Support for .ini, .json, and .yaml configuration files
- **Environment Variables**: Override config with environment variables
- **Concurrent Sending**: Send alerts to multiple channels simultaneously
- **Comprehensive Testing**: Full test suite with 95%+ coverage
## π¦ Installation
```bash
pip install evolvishub-alerting
```
### Optional Dependencies
For SMS support (Twilio):
```bash
pip install evolvishub-alerting[sms]
# or
pip install twilio
```
For YAML configuration support:
```bash
pip install evolvishub-alerting[yaml]
# or
pip install pyyaml
```
## π§ Quick Start
### 1. Create Configuration File
Create an `alert_config.ini` file:
```ini
[teams]
webhook_url = https://outlook.office.com/webhook/YOUR_WEBHOOK_URL
enabled = true
[email]
smtp_server = smtp.gmail.com
smtp_port = 587
username = your-email@gmail.com
password = your-app-password
from_email = alerts@yourcompany.com
to_emails = admin@yourcompany.com,dev@yourcompany.com
enabled = true
[slack]
webhook_url = https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
channel = #alerts
username = AlertBot
enabled = true
```
### 2. Send Your First Alert
```python
import asyncio
from alerting import AlertManager, AlertLevel
async def main():
# Initialize the alert manager
alert_manager = AlertManager("alert_config.ini")
# Send a simple alert
await alert_manager.send_alert(
message="Application started successfully",
level=AlertLevel.INFO,
title="Application Startup"
)
# Send an alert with metadata
await alert_manager.send_alert(
message="High memory usage detected",
level=AlertLevel.WARNING,
title="Performance Alert",
metadata={
"memory_usage": "85%",
"server": "web-01"
}
)
# Run the async function
asyncio.run(main())
```
## π Alert Types
### Software Issues
```python
async def handle_error():
try:
# Your code here
result = risky_operation()
except Exception as e:
await alert_manager.send_software_issue(
error=e,
context={"user_id": 123, "function": "risky_operation"}
)
```
### Performance Alerts
```python
async def monitor_performance():
await alert_manager.send_performance_alert(
metric="cpu_usage",
value=92.5,
threshold=80.0,
context={"server": "web-01"}
)
```
### Security Alerts
```python
async def security_monitoring():
await alert_manager.send_security_alert(
event="Multiple failed login attempts",
severity="high",
context={"ip": "192.168.1.100", "attempts": 5}
)
```
### Business Alerts
```python
async def business_monitoring():
await alert_manager.send_business_alert(
event="Payment processing down",
impact="critical",
context={"affected_customers": 150}
)
```
## π― Advanced Features
### Multiple Channel Configurations
Configure multiple channels of the same type:
```ini
# Primary Teams channel
[teams]
webhook_url = https://outlook.office.com/webhook/primary
enabled = true
# Development Teams channel
[teams_dev]
webhook_url = https://outlook.office.com/webhook/dev
enabled = true
# Critical email alerts
[email_critical]
smtp_server = smtp.gmail.com
username = critical@company.com
to_emails = ceo@company.com,cto@company.com
enabled = true
```
### Alert Filtering and Routing
```python
from alerting.core import AlertFilter
# Create filters for conditional routing
critical_filter = AlertFilter(
level=AlertLevel.CRITICAL,
channels=['teams', 'email', 'sms']
)
security_filter = AlertFilter(
category=AlertCategory.SECURITY,
channels=['email_critical', 'teams_security']
)
database_filter = AlertFilter(
keywords=['database', 'db', 'sql'],
channels=['slack_dba']
)
# Add filters to alert manager
alert_manager.add_filter(critical_filter)
alert_manager.add_filter(security_filter)
alert_manager.add_filter(database_filter)
```
### Targeted Channel Alerts
```python
async def send_targeted_alert():
# Send to specific channels only
await alert_manager.send_alert(
message="Database server is down",
level=AlertLevel.CRITICAL,
target_channels=["email", "sms"],
metadata={"server": "db-primary"}
)
```
### Concurrent Alert Sending
```python
async def send_multiple_alerts():
# Send multiple alerts concurrently
tasks = [
alert_manager.send_alert("Alert 1", AlertLevel.INFO),
alert_manager.send_alert("Alert 2", AlertLevel.WARNING),
alert_manager.send_alert("Alert 3", AlertLevel.ERROR)
]
# Wait for all alerts to complete
await asyncio.gather(*tasks)
```
## π Configuration Formats
### INI Format (alert_config.ini)
```ini
[teams]
webhook_url = https://outlook.office.com/webhook/test
enabled = true
[email]
smtp_server = smtp.gmail.com
smtp_port = 587
username = alerts@company.com
password = app-password
from_email = alerts@company.com
to_emails = admin@company.com
enabled = true
```
### JSON Format (alert_config.json)
```json
{
"teams": {
"webhook_url": "https://outlook.office.com/webhook/test",
"enabled": "true"
},
"email": {
"smtp_server": "smtp.gmail.com",
"smtp_port": "587",
"username": "alerts@company.com",
"password": "app-password",
"from_email": "alerts@company.com",
"to_emails": "admin@company.com",
"enabled": "true"
}
}
```
### YAML Format (alert_config.yaml)
```yaml
teams:
webhook_url: "https://outlook.office.com/webhook/test"
enabled: "true"
email:
smtp_server: "smtp.gmail.com"
smtp_port: "587"
username: "alerts@company.com"
password: "app-password"
from_email: "alerts@company.com"
to_emails: "admin@company.com"
enabled: "true"
```
### Environment Variables
Override any configuration with environment variables:
```bash
export ALERT_TEAMS_WEBHOOK_URL="https://outlook.office.com/webhook/env"
export ALERT_EMAIL_PASSWORD="env-password"
```
## π Supported Channels
### Microsoft Teams
```ini
[teams]
webhook_url = https://outlook.office.com/webhook/YOUR_WEBHOOK
enabled = true
```
### Email (SMTP)
```ini
[email]
smtp_server = smtp.gmail.com
smtp_port = 587
username = your-email@gmail.com
password = your-app-password
from_email = alerts@yourcompany.com
to_emails = admin@company.com,dev@company.com
use_tls = true
enabled = true
```
### Slack
```ini
[slack]
webhook_url = https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
channel = #alerts
username = AlertBot
enabled = true
```
### Discord
```ini
[discord]
webhook_url = https://discord.com/api/webhooks/YOUR_DISCORD_WEBHOOK
username = AlertBot
avatar_url = https://company.com/bot-avatar.png
enabled = true
```
### SMS (Twilio)
```ini
[sms]
service = twilio
account_sid = YOUR_TWILIO_ACCOUNT_SID
auth_token = YOUR_TWILIO_AUTH_TOKEN
from_number = +1234567890
to_numbers = +1111111111,+2222222222
enabled = true
```
### Custom Webhook
```ini
[webhook]
webhook_url = https://your-api.com/webhooks/alerts
method = POST
headers = {"Authorization": "Bearer TOKEN"}
timeout = 30
enabled = true
```
## π§ͺ Testing
Run the test suite:
```bash
# Install test dependencies
pip install -e .[test]
# Run tests
pytest
# Run tests with coverage
pytest --cov=alerting --cov-report=html
# Run specific test file
pytest tests/test_core.py
```
## π Examples
Check the `examples/` directory for comprehensive usage examples:
- `basic_usage.py` - Basic alert sending examples
- `advanced_usage.py` - Advanced features like filtering and rate limiting
- `alert_config.*.example` - Example configuration files
## π Security Best Practices
1. **Use App Passwords**: For email, use app-specific passwords instead of your main password
2. **Environment Variables**: Store sensitive credentials in environment variables
3. **Webhook Security**: Use HTTPS webhooks and validate webhook signatures when possible
4. **Rate Limiting**: Configure appropriate rate limits to prevent abuse
5. **Access Control**: Limit who can modify alert configurations
## π Production Deployment
### Docker Example
```dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "your_app.py"]
```
### Kubernetes ConfigMap
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: alert-config
data:
alert_config.ini: |
[teams]
webhook_url = https://outlook.office.com/webhook/prod
enabled = true
```
## π€ Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## οΏ½ PyPI Statistics
[](https://pepy.tech/project/evolvishub-alerting)
[](https://pepy.tech/project/evolvishub-alerting)
[](https://pepy.tech/project/evolvishub-alerting)
## οΏ½π License
This project is licensed under a Commercial License - see the [LICENSE](LICENSE) file for details.
## π Support
- **Documentation**: Check the examples and this README
- **Issues**: Report bugs on [GitHub Issues](https://github.com/evolvis-ai/evolvishub-alerting/issues)
- **Discussions**: Ask questions in [GitHub Discussions](https://github.com/evolvis-ai/evolvishub-alerting/discussions)
- **Commercial Support**: Contact [a.maxhuni@evolvis.ai](mailto:a.maxhuni@evolvis.ai)
## πΊοΈ Roadmap
- [ ] PagerDuty integration
- [ ] Telegram bot support
- [ ] Alert templates and formatting
- [ ] Metrics and monitoring dashboard
- [ ] Alert acknowledgment system
- [ ] Integration with popular monitoring tools (Prometheus, Grafana)
## π¨βπΌ Author & Company
**Author:** Alban Maxhuni, PhD
**Email:** [a.maxhuni@evolvis.ai](mailto:a.maxhuni@evolvis.ai)
**Company:** [Evolvis AI](https://evolvis.ai)
**About Evolvis AI:**
Evolvis AI is a cutting-edge technology company specializing in artificial intelligence solutions and advanced software development. We create innovative tools and libraries that empower developers and organizations to build robust, scalable applications.
Visit us at [https://evolvis.ai](https://evolvis.ai) to learn more about our products and services.
---
Made with β€οΈ by [Evolvis AI](https://evolvis.ai)
Raw data
{
"_id": null,
"home_page": "https://github.com/evolvis-ai/evolvishub-alerting",
"name": "evolvishub-alerting",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\"Alban Maxhuni, PhD\" <a.maxhuni@evolvis.ai>",
"keywords": "alerting, monitoring, notifications, teams, email, slack, discord, sms, webhook, async, asyncio",
"author": "Alban Maxhuni, PhD",
"author_email": "\"Alban Maxhuni, PhD\" <a.maxhuni@evolvis.ai>",
"download_url": "https://files.pythonhosted.org/packages/e0/e5/ca360d449f0a24837693f686595978714bb14e1d16a202bfd6565084e6d2/evolvishub_alerting-1.0.0.tar.gz",
"platform": null,
"description": "# EvolvisHub Alerting Library\n\n[](https://badge.fury.io/py/evolvishub-alerting)\n[](https://pepy.tech/project/evolvishub-alerting)\n[](https://pepy.tech/project/evolvishub-alerting)\n[](https://evolvis.ai/licenses/commercial-1.0)\n[](https://www.python.org/downloads/)\n\nA comprehensive, professional **asynchronous** multi-channel alerting library for Python applications. Send alerts and notifications through Microsoft Teams, Email, Slack, Discord, SMS, and custom webhooks with advanced features like filtering, rate limiting, and retry mechanisms.\n\n**Author:** Alban Maxhuni, PhD (a.maxhuni@evolvis.ai)\n**Company:** [Evolvis AI](https://evolvis.ai)\n**License:** Commercial License\n\n## \ud83d\ude80 Features\n\n- **\ud83d\udd04 Fully Asynchronous**: Built with async/await for high performance and scalability\n- **Multi-Channel Support**: Teams, Email, Slack, Discord, SMS (Twilio), Custom Webhooks\n- **Multiple Configurations**: Support multiple channels of the same type (e.g., different Teams channels)\n- **Alert Categories**: Software issues, Performance, Security, Business logic, Infrastructure, Data quality\n- **Advanced Filtering**: Route alerts to specific channels based on level, category, or keywords\n- **Rate Limiting**: Prevent spam with configurable rate limits per channel\n- **Retry Mechanism**: Automatic retry with exponential backoff for failed deliveries\n- **Multiple Config Formats**: Support for .ini, .json, and .yaml configuration files\n- **Environment Variables**: Override config with environment variables\n- **Concurrent Sending**: Send alerts to multiple channels simultaneously\n- **Comprehensive Testing**: Full test suite with 95%+ coverage\n\n## \ud83d\udce6 Installation\n\n```bash\npip install evolvishub-alerting\n```\n\n### Optional Dependencies\n\nFor SMS support (Twilio):\n```bash\npip install evolvishub-alerting[sms]\n# or\npip install twilio\n```\n\nFor YAML configuration support:\n```bash\npip install evolvishub-alerting[yaml]\n# or\npip install pyyaml\n```\n\n## \ud83d\udd27 Quick Start\n\n### 1. Create Configuration File\n\nCreate an `alert_config.ini` file:\n\n```ini\n[teams]\nwebhook_url = https://outlook.office.com/webhook/YOUR_WEBHOOK_URL\nenabled = true\n\n[email]\nsmtp_server = smtp.gmail.com\nsmtp_port = 587\nusername = your-email@gmail.com\npassword = your-app-password\nfrom_email = alerts@yourcompany.com\nto_emails = admin@yourcompany.com,dev@yourcompany.com\nenabled = true\n\n[slack]\nwebhook_url = https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK\nchannel = #alerts\nusername = AlertBot\nenabled = true\n```\n\n### 2. Send Your First Alert\n\n```python\nimport asyncio\nfrom alerting import AlertManager, AlertLevel\n\nasync def main():\n # Initialize the alert manager\n alert_manager = AlertManager(\"alert_config.ini\")\n\n # Send a simple alert\n await alert_manager.send_alert(\n message=\"Application started successfully\",\n level=AlertLevel.INFO,\n title=\"Application Startup\"\n )\n\n # Send an alert with metadata\n await alert_manager.send_alert(\n message=\"High memory usage detected\",\n level=AlertLevel.WARNING,\n title=\"Performance Alert\",\n metadata={\n \"memory_usage\": \"85%\",\n \"server\": \"web-01\"\n }\n )\n\n# Run the async function\nasyncio.run(main())\n```\n\n## \ud83d\udccb Alert Types\n\n### Software Issues\n```python\nasync def handle_error():\n try:\n # Your code here\n result = risky_operation()\n except Exception as e:\n await alert_manager.send_software_issue(\n error=e,\n context={\"user_id\": 123, \"function\": \"risky_operation\"}\n )\n```\n\n### Performance Alerts\n```python\nasync def monitor_performance():\n await alert_manager.send_performance_alert(\n metric=\"cpu_usage\",\n value=92.5,\n threshold=80.0,\n context={\"server\": \"web-01\"}\n )\n```\n\n### Security Alerts\n```python\nasync def security_monitoring():\n await alert_manager.send_security_alert(\n event=\"Multiple failed login attempts\",\n severity=\"high\",\n context={\"ip\": \"192.168.1.100\", \"attempts\": 5}\n )\n```\n\n### Business Alerts\n```python\nasync def business_monitoring():\n await alert_manager.send_business_alert(\n event=\"Payment processing down\",\n impact=\"critical\",\n context={\"affected_customers\": 150}\n )\n```\n\n## \ud83c\udfaf Advanced Features\n\n### Multiple Channel Configurations\n\nConfigure multiple channels of the same type:\n\n```ini\n# Primary Teams channel\n[teams]\nwebhook_url = https://outlook.office.com/webhook/primary\nenabled = true\n\n# Development Teams channel\n[teams_dev]\nwebhook_url = https://outlook.office.com/webhook/dev\nenabled = true\n\n# Critical email alerts\n[email_critical]\nsmtp_server = smtp.gmail.com\nusername = critical@company.com\nto_emails = ceo@company.com,cto@company.com\nenabled = true\n```\n\n### Alert Filtering and Routing\n\n```python\nfrom alerting.core import AlertFilter\n\n# Create filters for conditional routing\ncritical_filter = AlertFilter(\n level=AlertLevel.CRITICAL,\n channels=['teams', 'email', 'sms']\n)\n\nsecurity_filter = AlertFilter(\n category=AlertCategory.SECURITY,\n channels=['email_critical', 'teams_security']\n)\n\ndatabase_filter = AlertFilter(\n keywords=['database', 'db', 'sql'],\n channels=['slack_dba']\n)\n\n# Add filters to alert manager\nalert_manager.add_filter(critical_filter)\nalert_manager.add_filter(security_filter)\nalert_manager.add_filter(database_filter)\n```\n\n### Targeted Channel Alerts\n\n```python\nasync def send_targeted_alert():\n # Send to specific channels only\n await alert_manager.send_alert(\n message=\"Database server is down\",\n level=AlertLevel.CRITICAL,\n target_channels=[\"email\", \"sms\"],\n metadata={\"server\": \"db-primary\"}\n )\n```\n\n### Concurrent Alert Sending\n\n```python\nasync def send_multiple_alerts():\n # Send multiple alerts concurrently\n tasks = [\n alert_manager.send_alert(\"Alert 1\", AlertLevel.INFO),\n alert_manager.send_alert(\"Alert 2\", AlertLevel.WARNING),\n alert_manager.send_alert(\"Alert 3\", AlertLevel.ERROR)\n ]\n\n # Wait for all alerts to complete\n await asyncio.gather(*tasks)\n```\n\n## \ud83d\udcc1 Configuration Formats\n\n### INI Format (alert_config.ini)\n```ini\n[teams]\nwebhook_url = https://outlook.office.com/webhook/test\nenabled = true\n\n[email]\nsmtp_server = smtp.gmail.com\nsmtp_port = 587\nusername = alerts@company.com\npassword = app-password\nfrom_email = alerts@company.com\nto_emails = admin@company.com\nenabled = true\n```\n\n### JSON Format (alert_config.json)\n```json\n{\n \"teams\": {\n \"webhook_url\": \"https://outlook.office.com/webhook/test\",\n \"enabled\": \"true\"\n },\n \"email\": {\n \"smtp_server\": \"smtp.gmail.com\",\n \"smtp_port\": \"587\",\n \"username\": \"alerts@company.com\",\n \"password\": \"app-password\",\n \"from_email\": \"alerts@company.com\",\n \"to_emails\": \"admin@company.com\",\n \"enabled\": \"true\"\n }\n}\n```\n\n### YAML Format (alert_config.yaml)\n```yaml\nteams:\n webhook_url: \"https://outlook.office.com/webhook/test\"\n enabled: \"true\"\n\nemail:\n smtp_server: \"smtp.gmail.com\"\n smtp_port: \"587\"\n username: \"alerts@company.com\"\n password: \"app-password\"\n from_email: \"alerts@company.com\"\n to_emails: \"admin@company.com\"\n enabled: \"true\"\n```\n\n### Environment Variables\nOverride any configuration with environment variables:\n```bash\nexport ALERT_TEAMS_WEBHOOK_URL=\"https://outlook.office.com/webhook/env\"\nexport ALERT_EMAIL_PASSWORD=\"env-password\"\n```\n\n## \ud83d\udd0c Supported Channels\n\n### Microsoft Teams\n```ini\n[teams]\nwebhook_url = https://outlook.office.com/webhook/YOUR_WEBHOOK\nenabled = true\n```\n\n### Email (SMTP)\n```ini\n[email]\nsmtp_server = smtp.gmail.com\nsmtp_port = 587\nusername = your-email@gmail.com\npassword = your-app-password\nfrom_email = alerts@yourcompany.com\nto_emails = admin@company.com,dev@company.com\nuse_tls = true\nenabled = true\n```\n\n### Slack\n```ini\n[slack]\nwebhook_url = https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK\nchannel = #alerts\nusername = AlertBot\nenabled = true\n```\n\n### Discord\n```ini\n[discord]\nwebhook_url = https://discord.com/api/webhooks/YOUR_DISCORD_WEBHOOK\nusername = AlertBot\navatar_url = https://company.com/bot-avatar.png\nenabled = true\n```\n\n### SMS (Twilio)\n```ini\n[sms]\nservice = twilio\naccount_sid = YOUR_TWILIO_ACCOUNT_SID\nauth_token = YOUR_TWILIO_AUTH_TOKEN\nfrom_number = +1234567890\nto_numbers = +1111111111,+2222222222\nenabled = true\n```\n\n### Custom Webhook\n```ini\n[webhook]\nwebhook_url = https://your-api.com/webhooks/alerts\nmethod = POST\nheaders = {\"Authorization\": \"Bearer TOKEN\"}\ntimeout = 30\nenabled = true\n```\n\n## \ud83e\uddea Testing\n\nRun the test suite:\n\n```bash\n# Install test dependencies\npip install -e .[test]\n\n# Run tests\npytest\n\n# Run tests with coverage\npytest --cov=alerting --cov-report=html\n\n# Run specific test file\npytest tests/test_core.py\n```\n\n## \ud83d\udcda Examples\n\nCheck the `examples/` directory for comprehensive usage examples:\n\n- `basic_usage.py` - Basic alert sending examples\n- `advanced_usage.py` - Advanced features like filtering and rate limiting\n- `alert_config.*.example` - Example configuration files\n\n## \ud83d\udd12 Security Best Practices\n\n1. **Use App Passwords**: For email, use app-specific passwords instead of your main password\n2. **Environment Variables**: Store sensitive credentials in environment variables\n3. **Webhook Security**: Use HTTPS webhooks and validate webhook signatures when possible\n4. **Rate Limiting**: Configure appropriate rate limits to prevent abuse\n5. **Access Control**: Limit who can modify alert configurations\n\n## \ud83d\ude80 Production Deployment\n\n### Docker Example\n```dockerfile\nFROM python:3.9-slim\n\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install -r requirements.txt\n\nCOPY . .\nCMD [\"python\", \"your_app.py\"]\n```\n\n### Kubernetes ConfigMap\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: alert-config\ndata:\n alert_config.ini: |\n [teams]\n webhook_url = https://outlook.office.com/webhook/prod\n enabled = true\n```\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## \ufffd PyPI Statistics\n\n[](https://pepy.tech/project/evolvishub-alerting)\n[](https://pepy.tech/project/evolvishub-alerting)\n[](https://pepy.tech/project/evolvishub-alerting)\n\n## \ufffd\ud83d\udcc4 License\n\nThis project is licensed under a Commercial License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83c\udd98 Support\n\n- **Documentation**: Check the examples and this README\n- **Issues**: Report bugs on [GitHub Issues](https://github.com/evolvis-ai/evolvishub-alerting/issues)\n- **Discussions**: Ask questions in [GitHub Discussions](https://github.com/evolvis-ai/evolvishub-alerting/discussions)\n- **Commercial Support**: Contact [a.maxhuni@evolvis.ai](mailto:a.maxhuni@evolvis.ai)\n\n## \ud83d\uddfa\ufe0f Roadmap\n\n- [ ] PagerDuty integration\n- [ ] Telegram bot support\n- [ ] Alert templates and formatting\n- [ ] Metrics and monitoring dashboard\n- [ ] Alert acknowledgment system\n- [ ] Integration with popular monitoring tools (Prometheus, Grafana)\n\n## \ud83d\udc68\u200d\ud83d\udcbc Author & Company\n\n**Author:** Alban Maxhuni, PhD\n**Email:** [a.maxhuni@evolvis.ai](mailto:a.maxhuni@evolvis.ai)\n**Company:** [Evolvis AI](https://evolvis.ai)\n\n**About Evolvis AI:**\nEvolvis AI is a cutting-edge technology company specializing in artificial intelligence solutions and advanced software development. We create innovative tools and libraries that empower developers and organizations to build robust, scalable applications.\n\nVisit us at [https://evolvis.ai](https://evolvis.ai) to learn more about our products and services.\n\n---\n\nMade with \u2764\ufe0f by [Evolvis AI](https://evolvis.ai)\n",
"bugtrack_url": null,
"license": "COMMERCIAL LICENSE\n \n EvolvisHub Alerting Library\n Copyright (c) 2024 Evolvis AI (https://evolvis.ai)\n Author: Alban Maxhuni, PhD (a.maxhuni@evolvis.ai)\n \n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n \n 1. DEFINITIONS\n \n \"License\" shall mean the terms and conditions for use, reproduction, and \n distribution as defined by Sections 1 through 9 of this document.\n \n \"Licensor\" shall mean Evolvis AI, the copyright owner or entity authorized \n by the copyright owner that is granting the License.\n \n \"Legal Entity\" shall mean the union of the acting entity and all other \n entities that control, are controlled by, or are under common control \n with that entity.\n \n \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising \n permissions granted by this License.\n \n \"Source\" form shall mean the preferred form for making modifications, \n including but not limited to software source code, documentation source, \n and configuration files.\n \n \"Object\" form shall mean any form resulting from mechanical transformation \n or translation of a Source form, including but not limited to compiled \n object code, generated documentation, and conversions to other media types.\n \n \"Work\" shall mean the work of authorship, whether in Source or Object form, \n made available under the License, as indicated by a copyright notice that \n is included in or attached to the work.\n \n \"Derivative Works\" shall mean any work, whether in Source or Object form, \n that is based upon (or derived from) the Work and for which the editorial \n revisions, annotations, elaborations, or other modifications represent, as \n a whole, an original work of authorship.\n \n \"Contribution\" shall mean any work of authorship, including the original \n version of the Work and any modifications or additions to that Work or \n Derivative Works thereof, that is intentionally submitted to Licensor for \n inclusion in the Work.\n \n 2. GRANT OF COPYRIGHT LICENSE\n \n Subject to the terms and conditions of this License, each Contributor hereby \n grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, \n irrevocable copyright license to use, reproduce, prepare Derivative Works of, \n publicly display, publicly perform, sublicense, and distribute the Work and \n such Derivative Works in Source or Object form.\n \n 3. GRANT OF PATENT LICENSE\n \n Subject to the terms and conditions of this License, each Contributor hereby \n grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, \n irrevocable (except as stated in this section) patent license to make, have \n made, use, offer to sell, sell, import, and otherwise transfer the Work.\n \n 4. REDISTRIBUTION\n \n You may reproduce and distribute copies of the Work or Derivative Works \n thereof in any medium, with or without modifications, and in Source or \n Object form, provided that You meet the following conditions:\n \n (a) You must give any other recipients of the Work or Derivative Works a \n copy of this License; and\n \n (b) You must cause any modified files to carry prominent notices stating \n that You changed the files; and\n \n (c) You must retain, in the Source form of any Derivative Works that You \n distribute, all copyright, patent, trademark, and attribution notices from \n the Source form of the Work; and\n \n (d) If the Work includes a \"NOTICE\" text file as part of its distribution, \n then any Derivative Works that You distribute must include a readable copy \n of the attribution notices contained within such NOTICE file.\n \n 5. SUBMISSION OF CONTRIBUTIONS\n \n Unless You explicitly state otherwise, any Contribution intentionally \n submitted for inclusion in the Work by You to the Licensor shall be under \n the terms and conditions of this License, without any additional terms or \n conditions.\n \n 6. TRADEMARKS\n \n This License does not grant permission to use the trade names, trademarks, \n service marks, or product names of the Licensor, except as required for \n reasonable and customary use in describing the origin of the Work.\n \n 7. DISCLAIMER OF WARRANTY\n \n Unless required by applicable law or agreed to in writing, Licensor provides \n the Work (and each Contributor provides its Contributions) on an \"AS IS\" \n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \n implied, including, without limitation, any warranties or conditions of \n TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.\n \n 8. LIMITATION OF LIABILITY\n \n In no event and under no legal theory, whether in tort (including negligence), \n contract, or otherwise, unless required by applicable law (such as deliberate \n and grossly negligent acts) or agreed to in writing, shall any Contributor be \n liable to You for damages, including any direct, indirect, special, incidental, \n or consequential damages of any character arising as a result of this License \n or out of the use or inability to use the Work.\n \n 9. ACCEPTING WARRANTY OR ADDITIONAL LIABILITY\n \n When redistributing the Work or Derivative Works thereof, You may choose to \n offer, and charge a fee for, acceptance of support, warranty, indemnity, or \n other liability obligations and/or rights consistent with this License.\n \n END OF TERMS AND CONDITIONS\n ",
"summary": "A comprehensive, professional asynchronous multi-channel alerting library for Python applications",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/evolvis-ai/evolvishub-alerting/issues",
"Company": "https://evolvis.ai",
"Documentation": "https://github.com/evolvis-ai/evolvishub-alerting#readme",
"Homepage": "https://evolvis.ai",
"Repository": "https://github.com/evolvis-ai/evolvishub-alerting.git"
},
"split_keywords": [
"alerting",
" monitoring",
" notifications",
" teams",
" email",
" slack",
" discord",
" sms",
" webhook",
" async",
" asyncio"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fbe453c1bc181196a3faac189f058f4088a89e28e68ae061c3afa4fcd1a4a470",
"md5": "ffd36ac8917a33af588d4ab79dff4c00",
"sha256": "63c69f628554687a797008150447dec940bf6200c153ef1e4af578c929facff9"
},
"downloads": -1,
"filename": "evolvishub_alerting-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ffd36ac8917a33af588d4ab79dff4c00",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 21390,
"upload_time": "2025-07-19T10:22:18",
"upload_time_iso_8601": "2025-07-19T10:22:18.955568Z",
"url": "https://files.pythonhosted.org/packages/fb/e4/53c1bc181196a3faac189f058f4088a89e28e68ae061c3afa4fcd1a4a470/evolvishub_alerting-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e0e5ca360d449f0a24837693f686595978714bb14e1d16a202bfd6565084e6d2",
"md5": "18852ca3e946c0fd33cc4fdb375a5bda",
"sha256": "591136ae0c3dbef55bc7b1584545a9207952e13ab973f1ba4daabef288544872"
},
"downloads": -1,
"filename": "evolvishub_alerting-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "18852ca3e946c0fd33cc4fdb375a5bda",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 32093,
"upload_time": "2025-07-19T10:22:20",
"upload_time_iso_8601": "2025-07-19T10:22:20.630372Z",
"url": "https://files.pythonhosted.org/packages/e0/e5/ca360d449f0a24837693f686595978714bb14e1d16a202bfd6565084e6d2/evolvishub_alerting-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-19 10:22:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "evolvis-ai",
"github_project": "evolvishub-alerting",
"github_not_found": true,
"lcname": "evolvishub-alerting"
}