Metadata-Version: 2.4
Name: llama-notifications
Version: 0.1.0
Summary: Notification system for the LlamaAI Ecosystem (push, email, SMS).
Project-URL: Homepage, https://github.com/llama-ai/llama-notifications
Author-email: Llama Notifications Team <team@llamanotifications.dev>
License: MIT
License-File: LICENSE
Keywords: alerting,email,llama,notifications,push,sms
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: apns2>=0.5.0
Requires-Dist: cryptography>=41.0.7
Requires-Dist: firebase-admin>=6.2.0
Requires-Dist: hyper>=0.7.0
Requires-Dist: pydantic>=2.4.2
Requires-Dist: pyjwt>=2.8.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: sendgrid>=6.10.0
Requires-Dist: twilio>=8.5.0
Provides-Extra: dev
Requires-Dist: bandit>=1.7.5; extra == 'dev'
Requires-Dist: black>=23.9.1; extra == 'dev'
Requires-Dist: build>=1.0.3; extra == 'dev'
Requires-Dist: coverage>=7.3.2; extra == 'dev'
Requires-Dist: flake8>=6.1.0; extra == 'dev'
Requires-Dist: isort>=5.12.0; extra == 'dev'
Requires-Dist: mypy>=1.5.1; extra == 'dev'
Requires-Dist: pre-commit>=3.4.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.1; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.11.1; extra == 'dev'
Requires-Dist: pytest>=7.4.2; extra == 'dev'
Requires-Dist: safety>=2.3.5; extra == 'dev'
Requires-Dist: sphinx-autodoc-typehints>=1.24.0; extra == 'dev'
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == 'dev'
Requires-Dist: sphinx>=7.2.6; extra == 'dev'
Requires-Dist: twine>=4.0.2; extra == 'dev'
Requires-Dist: types-pyjwt>=1.7.1; extra == 'dev'
Requires-Dist: types-requests>=2.31.0.2; extra == 'dev'
Provides-Extra: mlx
Requires-Dist: mlx>=0.0.17; extra == 'mlx'
Description-Content-Type: text/markdown

# llama-notifications

[![PyPI version](https://img.shields.io/pypi/v/llama_notifications.svg)](https://pypi.org/project/llama_notifications/)
[![License](https://img.shields.io/github/license/llamasearchai/llama-notifications)](https://github.com/llamasearchai/llama-notifications/blob/main/LICENSE)
[![Python Version](https://img.shields.io/pypi/pyversions/llama_notifications.svg)](https://pypi.org/project/llama_notifications/)
[![CI Status](https://github.com/llamasearchai/llama-notifications/actions/workflows/llamasearchai_ci.yml/badge.svg)](https://github.com/llamasearchai/llama-notifications/actions/workflows/llamasearchai_ci.yml)

**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

```bash
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.)*

```python
# 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

```mermaid
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
```

1.  **Trigger:** An application or service signals the need to send a notification.
2.  **Core Manager:** Receives the request and orchestrates the process.
3.  **Processing Modules:** It leverages context, priority, spam filtering, packaging, and security modules to prepare the notification.
4.  **Channel Selection:** Based on configuration and message details, it selects the appropriate delivery channel(s).
5.  **Delivery:** The notification is sent via the chosen channel interface (e.g., Email, SMS, Push).
6.  **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

```bash
# 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

```bash
pytest tests/
```

### Contributing

Contributions are welcome! Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) and submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
