# Event SMS Notifier
A Python library for event notifications with SMS capabilities using Africa's Talking API. Perfect for period tracking, appointment reminders, and general event notifications.
## Installation
```bash
pip install event-sms-notifier
```
## Quick Start
```python
from event_notifier import EventNotifier
from datetime import datetime, timedelta
# Initialize the notifier
notifier = EventNotifier(
username="your_username", # Your Africa's Talking username
api_key="your_api_key", # Your Africa's Talking API key
sender_id="your_sender_id" # Your sender ID
)
# Add an event
notifier.add_event({
"name": "Important Meeting",
"datetime": datetime.now() + timedelta(minutes=30)
})
# Start monitoring
notifier.start_monitoring(
recipients="+1234567890", # Phone number to receive notifications
interval_seconds=120 # Check every 2 minutes
)
```
## Features
- Event monitoring and SMS notifications
- Flexible datetime input (string or datetime object)
- Customizable message templates
- Support for multiple recipients
- Configurable check intervals
- Built-in period tracking capabilities
## Period Tracking Example
```python
from event_notifier import EventNotifier
from datetime import datetime, timedelta
notifier = EventNotifier(
username="your_username",
api_key="your_api_key",
sender_id="your_sender_id"
)
# Add period events
events = [
{
"name": "Period Starts",
"datetime": datetime.now() + timedelta(days=1)
},
{
"name": "Ovulation Day",
"datetime": datetime.now() + timedelta(days=14)
}
]
for event in events:
notifier.add_event(event)
# Custom message template
template = """
🔴 Period Alert: {name}
Time: {time}
Take care!
"""
# Start monitoring
notifier.start_monitoring(
recipients="+1234567890",
interval_seconds=300,
message_template=template
)
```
## Requirements
- Python 3.6+
- Africa's Talking account
- Valid API credentials
- Registered phone number
## Documentation
For more examples and detailed documentation, visit our [GitHub repository](https://github.com/yourusername/event-notifier).
## License
MIT License - see LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "event-sms-notifier",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "event notification sms africa's talking period tracking reminder",
"author": "Namugga Sharifah",
"author_email": "sharifahnamugga3@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/71/2e/7eadf25f262831844d3f5ed2d5878243356a2b1d57692eb24c8447d901a4/event_sms_notifier-0.1.0.tar.gz",
"platform": null,
"description": "# Event SMS Notifier\r\n\r\nA Python library for event notifications with SMS capabilities using Africa's Talking API. Perfect for period tracking, appointment reminders, and general event notifications.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install event-sms-notifier\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom event_notifier import EventNotifier\r\nfrom datetime import datetime, timedelta\r\n\r\n# Initialize the notifier\r\nnotifier = EventNotifier(\r\n username=\"your_username\", # Your Africa's Talking username\r\n api_key=\"your_api_key\", # Your Africa's Talking API key\r\n sender_id=\"your_sender_id\" # Your sender ID\r\n)\r\n\r\n# Add an event\r\nnotifier.add_event({\r\n \"name\": \"Important Meeting\",\r\n \"datetime\": datetime.now() + timedelta(minutes=30)\r\n})\r\n\r\n# Start monitoring\r\nnotifier.start_monitoring(\r\n recipients=\"+1234567890\", # Phone number to receive notifications\r\n interval_seconds=120 # Check every 2 minutes\r\n)\r\n```\r\n\r\n## Features\r\n\r\n- Event monitoring and SMS notifications\r\n- Flexible datetime input (string or datetime object)\r\n- Customizable message templates\r\n- Support for multiple recipients\r\n- Configurable check intervals\r\n- Built-in period tracking capabilities\r\n\r\n## Period Tracking Example\r\n\r\n```python\r\nfrom event_notifier import EventNotifier\r\nfrom datetime import datetime, timedelta\r\n\r\nnotifier = EventNotifier(\r\n username=\"your_username\",\r\n api_key=\"your_api_key\",\r\n sender_id=\"your_sender_id\"\r\n)\r\n\r\n# Add period events\r\nevents = [\r\n {\r\n \"name\": \"Period Starts\",\r\n \"datetime\": datetime.now() + timedelta(days=1)\r\n },\r\n {\r\n \"name\": \"Ovulation Day\",\r\n \"datetime\": datetime.now() + timedelta(days=14)\r\n }\r\n]\r\n\r\nfor event in events:\r\n notifier.add_event(event)\r\n\r\n# Custom message template\r\ntemplate = \"\"\"\r\n\ud83d\udd34 Period Alert: {name}\r\nTime: {time}\r\nTake care!\r\n\"\"\"\r\n\r\n# Start monitoring\r\nnotifier.start_monitoring(\r\n recipients=\"+1234567890\",\r\n interval_seconds=300,\r\n message_template=template\r\n)\r\n```\r\n\r\n## Requirements\r\n\r\n- Python 3.6+\r\n- Africa's Talking account\r\n- Valid API credentials\r\n- Registered phone number\r\n\r\n## Documentation\r\n\r\nFor more examples and detailed documentation, visit our [GitHub repository](https://github.com/yourusername/event-notifier).\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A library for event notifications with SMS capabilities using Africa's Talking",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"event",
"notification",
"sms",
"africa's",
"talking",
"period",
"tracking",
"reminder"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2405928218eb51e7423ab89f820081c17ceaa244b9a4ea99fb49957aa34520a7",
"md5": "e4f53a3f412bfdf4f7ca435f661ec308",
"sha256": "7a7e1eb9df1a6ba3c8acaed9fd8c4cbf9d1bb1685d9c89a9d9b483f9267b201a"
},
"downloads": -1,
"filename": "event_sms_notifier-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4f53a3f412bfdf4f7ca435f661ec308",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5439,
"upload_time": "2024-12-12T12:20:46",
"upload_time_iso_8601": "2024-12-12T12:20:46.438116Z",
"url": "https://files.pythonhosted.org/packages/24/05/928218eb51e7423ab89f820081c17ceaa244b9a4ea99fb49957aa34520a7/event_sms_notifier-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "712e7eadf25f262831844d3f5ed2d5878243356a2b1d57692eb24c8447d901a4",
"md5": "c389cf5b25edfb42ddb102022111bdb3",
"sha256": "560acb7891570711d2faf4dbc7c4175655fe4d0205fdcba576a14ad6affd9e1e"
},
"downloads": -1,
"filename": "event_sms_notifier-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c389cf5b25edfb42ddb102022111bdb3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5184,
"upload_time": "2024-12-12T12:20:49",
"upload_time_iso_8601": "2024-12-12T12:20:49.526089Z",
"url": "https://files.pythonhosted.org/packages/71/2e/7eadf25f262831844d3f5ed2d5878243356a2b1d57692eb24c8447d901a4/event_sms_notifier-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 12:20:49",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "event-sms-notifier"
}