Notification system for the LlamaAI Ecosystem (push, email, SMS).
Project description
llama-notifications
Llama Notifications (llama-notifications) provides a robust system for managing and delivering notifications within the LlamaSearch AI ecosystem. It supports features like prioritizing messages, filtering spam, considering context, securing delivery, and packaging notifications.
Key Features
- Notification Delivery: Core logic for sending notifications through various channels (e.g., email, SMS, push).
- Priority Management: Allows assigning and handling different notification priorities (
priority.py). - Spam Filtering: Includes mechanisms to detect and filter potential spam notifications (
spam_filter.py). - Context Awareness: Can potentially tailor notifications based on user context or application state (
context.py). - Packaging: Components related to packaging or formatting notifications (
package.py). - Security: Features for secure notification delivery, possibly involving encryption (
security.py). - Core Module: Orchestrates notification generation and delivery (
core.py). - Configurable: Allows defining notification channels, priorities, spam rules, security settings, etc. (
config.py).
Installation
pip install llama-notifications
# Or install directly from GitHub for the latest version:
# pip install git+https://github.com/llamasearchai/llama-notifications.git
Usage
(Usage examples for sending notifications with different priorities or context will be added here.)
# Placeholder for Python client usage
# from llama_notifications import Notifier, NotificationConfig, Message
# config = NotificationConfig.load("config.yaml")
# notifier = Notifier(config)
# # Create a message
# message = Message(
# recipient="user@example.com",
# subject="Important Update",
# body="Your report is ready.",
# channel="email",
# priority="high"
# )
# # Send the notification
# result = notifier.send(message)
# if result.success:
# print(f"Notification sent successfully to {message.recipient}")
# else:
# print(f"Failed to send notification: {result.error}")
Architecture Overview
graph TD
A[Application / Service] -- Triggers Notification --> B{Core Notification Manager (core.py)};
B -- Uses --> C{Context Module (context.py)};
B -- Uses --> D{Priority Module (priority.py)};
B -- Uses --> E{Spam Filter (spam_filter.py)};
B -- Uses --> F{Packaging Module (package.py)};
B -- Uses --> G{Security Module (security.py)};
C --> B;
D --> B;
E --> B;
F --> B;
G --> B;
B -- Selects Channel & Sends --> H{Delivery Channel Interface};
H --> I[Email Gateway];
H --> J[SMS Gateway];
H --> K[Push Notification Service];
H --> L[...];
M[Configuration (config.py)] -- Configures --> B;
M -- Configures --> C; M -- Configures --> D; M -- Configures --> E;
M -- Configures --> F; M -- Configures --> G; M -- Configures --> H;
style B fill:#f9f,stroke:#333,stroke-width:2px
style I fill:#ccf,stroke:#333,stroke-width:1px
style J fill:#ccf,stroke:#333,stroke-width:1px
style K fill:#ccf,stroke:#333,stroke-width:1px
- Trigger: An application or service signals the need to send a notification.
- Core Manager: Receives the request and orchestrates the process.
- Processing Modules: It leverages context, priority, spam filtering, packaging, and security modules to prepare the notification.
- Channel Selection: Based on configuration and message details, it selects the appropriate delivery channel(s).
- Delivery: The notification is sent via the chosen channel interface (e.g., Email, SMS, Push).
- Configuration: Defines available channels, priorities, spam rules, security parameters, etc.
Configuration
(Details on configuring delivery channels (API keys, endpoints), priority levels, spam filter rules, context variables, security settings, etc., will be added here.)
Development
Setup
# Clone the repository
git clone https://github.com/llamasearchai/llama-notifications.git
cd llama-notifications
# Install in editable mode with development dependencies
pip install -e ".[dev]"
Testing
pytest tests/
Contributing
Contributions are welcome! Please refer to CONTRIBUTING.md and submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_notifications-0.1.0.tar.gz.
File metadata
- Download URL: llama_notifications-0.1.0.tar.gz
- Upload date:
- Size: 34.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e71bb3c6bc6967c77fb3ce94f2d9d620e7053cc0161b88dc73062f770fae195
|
|
| MD5 |
ec5ca5036a81501b94a85e0257dfd64a
|
|
| BLAKE2b-256 |
8817ebad875e1ffd90f31ed4d6d4212394d2cc641e4ed12bbbf9cf7d85cc370a
|
File details
Details for the file llama_notifications-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_notifications-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c21fac24155f9e5be0d3477d4f022db59e46bf0d2fa408261f8b8fc472fa81
|
|
| MD5 |
502e564685e3b315e7da1f92ae3b93ce
|
|
| BLAKE2b-256 |
ec9cecdbbf6158fcdb313bdfe0b98aa714a74a63d53aa7be6f593105ee9879b9
|