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.
Metadata
Release files for llama-notifications 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llama_notifications-0.1.0.tar.gz | 34.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_notifications-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.6 kB
Release files / llama_notifications-0.1.0.tar.gz
| Download URL | llama_notifications-0.1.0.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e71bb3c6bc6967c77fb3ce94f2d9d620e7053cc0161b88dc73062f770fae195
|
|
BLAKE2b-256 checksum How to use checksums |
8817ebad875e1ffd90f31ed4d6d4212394d2cc641e4ed12bbbf9cf7d85cc370a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / llama_notifications-0.1.0-py3-none-any.whl
| Download URL | llama_notifications-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8c21fac24155f9e5be0d3477d4f022db59e46bf0d2fa408261f8b8fc472fa81
|
|
BLAKE2b-256 checksum How to use checksums |
ec9cecdbbf6158fcdb313bdfe0b98aa714a74a63d53aa7be6f593105ee9879b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|