pingpongx


Namepingpongx JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/karan-kap00r/PingPong
SummaryA dynamic notification delivery system with Redis and Kafka integration.
upload_time2024-12-23 14:59:59
maintainerNone
docs_urlNone
authorKaran Kapoor
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements fastapi uvicorn redis kafka-python google-cloud-firestore twilio Jinja2 bcrypt passlib PyJWT google-cloud-secret-manager
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **PingPong: A Dynamic and Scalable Notification Delivery System**

PingPong is a robust, scalable, and highly customizable **Dynamic Notification Delivery System** designed to efficiently manage and deliver notifications across various channels, including **Email**, **SMS**, and **Push Notifications**. Built with modern technologies and adhering to high-performance standards, PingPong serves as a comprehensive solution for handling diverse notification workflows, ensuring reliability, speed, and scalability.

---

## **Features**
### 🔔 **Multi-Channel Notification Delivery**
- **Email**: Seamlessly integrates with **Mailgun** and other email providers for reliable email delivery {Future Scope}.
- **SMS**: Supports integration with **Twilio** for fast and secure text message delivery.
- **Push Notifications**: Will be implementing for real-time, personalized push notifications to mobile and web devices. {Future Scope}

### 💾 **Data Management**
- Centralized storage in **Google Firestore**, optimized for managing user preferences and notification history.
- Flexible and scalable queues powered by **Redis** and **Kafka**, ensuring efficient message processing and delivery.

### ⚡ **User-Centric Design**
- Supports **user preferences** to respect channel priorities and avoid unnecessary notifications.
- Allocates **unique notification IDs** for precise tracking and audit trails.

### 🛡️ **Secure and Robust Architecture**
- **Authentication and Authorization**:
  - Implements a secure login and signup feature with **JWT-based authentication**.
  - Dynamically handles notification publishing based on logged-in user context.
- **Message Integrity**: Ensures notifications are correctly routed to their intended users, leveraging Redis and Kafka filtering logic.

### 🚀 **Scalability and Performance**
- Dockerized microservice architecture for seamless deployment and portability.
- Scalable infrastructure to handle millions of notifications, ensuring minimal latency and high throughput.
- Auto-scaling and cost-efficient hosting on **GCP Cloud Run** with pay-as-you-use billing.

### 🛠️ **Developer-Friendly**
- Designed for extensibility with clear and modular code.
- Supports new channel integrations with minimal effort.
- Just import the package for publishing, consuming, and managing notifications.


### 🛠️ **User-Friendly**
- Easy-to-use interface with a class-based design for sending notifications.
- You can opt for trail account for sending 3 emails and 1 sms/48 hours.
- Support for configurable parameters, including sender, receiver, notification channels & API/Auth Keys.
- Integration with popular services like Mailgun (for email) and Twilio (for SMS).
- Future-ready: Additional notification services will be supported in upcoming updates.
- Fully customizable by passing API Keys and Auth Tokens.
---

## **Tech Stack**
- **Backend**: Python, FastAPI
- **Messaging Queues**: Kafka, Redis
- **Database**: Google Firestore
- **Notifications**: Mailgun, Twilio, OneSignal
- **Deployment**: Docker, GCP Cloud Run
- **Authentication**: JWT-based authentication and role management

---

## **How It Works**
1. **Notification Publishing**:
   - Users or services send notification requests via a REST API endpoint for demo purpose or by importing python package with their personal API keys.
   - Notifications are queued in **Redis** and **Kafka** for asynchronous processing.

2. **User Preferences**:
   - Every user can configure their preferred notification channels (e.g., Email, SMS).
   - Notifications respect user preferences during both publishing and consumption.

3. **Message Consumption**:
   - Consumers retrieve notifications from queues and deliver them through the appropriate channels.
   - Redis ensures only recent and relevant messages are processed.

4. **Integration with External Services**:
   - Email and SMS are sent using external providers (Mailgun, Omnisend, Twilio, etc).

5. **Analytics and Tracking**:
   - All notifications are logged with unique IDs in **Firestore**, enabling detailed tracking and reporting.

---

## **GitHub Setup and Usage**
1. Clone the repository:
   ```bash
   git clone https://github.com/karan-kap00r/PingPong.git
   cd pingpongx
   ```

2. Build and run the Docker containers:
   ```bash
   docker-compose up --build
   ```

3. Access the API on `http://localhost:8080` and explore the interactive Swagger documentation at `http://localhost:8000/docs`.

4. Configure your environment variables:
   - Redis and Kafka configurations.
   - API keys for Mailgun, Twilio, Omnisend, and OneSignal.

5. Enjoy the PingPong.

---

## **PyPI Setup and Usage**
- To import package:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/import.png)
- To send notifications by importing python package:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/code.png)
- To set and get user preferences:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/get_set_UP.png)

---
## **Usage Via APIs**
- To SignUp:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/signUp.png)
- To Login:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/login.png)
- To Send Notifications:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/send.png)
- To Get User Preferences:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/getUP.png)
- To Update User Preferences:
![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/setUP.png)
---

## **Why PingPong?**
PingPong is the ultimate notification management solution for projects demanding:
- **High performance**: Deliver notifications at lightning speed to millions of users.
- **Scalability**: Handle growing notification workloads with ease.
- **Flexibility**: Support for multiple notification channels and user preferences.
- **Security**: Robust authentication and secure data management.

---

## **Contributions**
We welcome contributions to enhance PingPong! Feel free to submit pull requests, open issues, or share feature ideas.

---

## **License**
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).  

---

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/karan-kap00r/PingPong",
    "name": "pingpongx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Karan Kapoor",
    "author_email": "kaykay9464769@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/b2/1d95f4b4c1657e2c3722acaa13fc7cd41bbf230aa0177bdf150472080877/pingpongx-0.1.8.tar.gz",
    "platform": null,
    "description": "# **PingPong: A Dynamic and Scalable Notification Delivery System**\n\nPingPong is a robust, scalable, and highly customizable **Dynamic Notification Delivery System** designed to efficiently manage and deliver notifications across various channels, including **Email**, **SMS**, and **Push Notifications**. Built with modern technologies and adhering to high-performance standards, PingPong serves as a comprehensive solution for handling diverse notification workflows, ensuring reliability, speed, and scalability.\n\n---\n\n## **Features**\n### \ud83d\udd14 **Multi-Channel Notification Delivery**\n- **Email**: Seamlessly integrates with **Mailgun** and other email providers for reliable email delivery {Future Scope}.\n- **SMS**: Supports integration with **Twilio** for fast and secure text message delivery.\n- **Push Notifications**: Will be implementing for real-time, personalized push notifications to mobile and web devices. {Future Scope}\n\n### \ud83d\udcbe **Data Management**\n- Centralized storage in **Google Firestore**, optimized for managing user preferences and notification history.\n- Flexible and scalable queues powered by **Redis** and **Kafka**, ensuring efficient message processing and delivery.\n\n### \u26a1 **User-Centric Design**\n- Supports **user preferences** to respect channel priorities and avoid unnecessary notifications.\n- Allocates **unique notification IDs** for precise tracking and audit trails.\n\n### \ud83d\udee1\ufe0f **Secure and Robust Architecture**\n- **Authentication and Authorization**:\n  - Implements a secure login and signup feature with **JWT-based authentication**.\n  - Dynamically handles notification publishing based on logged-in user context.\n- **Message Integrity**: Ensures notifications are correctly routed to their intended users, leveraging Redis and Kafka filtering logic.\n\n### \ud83d\ude80 **Scalability and Performance**\n- Dockerized microservice architecture for seamless deployment and portability.\n- Scalable infrastructure to handle millions of notifications, ensuring minimal latency and high throughput.\n- Auto-scaling and cost-efficient hosting on **GCP Cloud Run** with pay-as-you-use billing.\n\n### \ud83d\udee0\ufe0f **Developer-Friendly**\n- Designed for extensibility with clear and modular code.\n- Supports new channel integrations with minimal effort.\n- Just import the package for publishing, consuming, and managing notifications.\n\n\n### \ud83d\udee0\ufe0f **User-Friendly**\n- Easy-to-use interface with a class-based design for sending notifications.\n- You can opt for trail account for sending 3 emails and 1 sms/48 hours.\n- Support for configurable parameters, including sender, receiver, notification channels & API/Auth Keys.\n- Integration with popular services like Mailgun (for email) and Twilio (for SMS).\n- Future-ready: Additional notification services will be supported in upcoming updates.\n- Fully customizable by passing API Keys and Auth Tokens.\n---\n\n## **Tech Stack**\n- **Backend**: Python, FastAPI\n- **Messaging Queues**: Kafka, Redis\n- **Database**: Google Firestore\n- **Notifications**: Mailgun, Twilio, OneSignal\n- **Deployment**: Docker, GCP Cloud Run\n- **Authentication**: JWT-based authentication and role management\n\n---\n\n## **How It Works**\n1. **Notification Publishing**:\n   - Users or services send notification requests via a REST API endpoint for demo purpose or by importing python package with their personal API keys.\n   - Notifications are queued in **Redis** and **Kafka** for asynchronous processing.\n\n2. **User Preferences**:\n   - Every user can configure their preferred notification channels (e.g., Email, SMS).\n   - Notifications respect user preferences during both publishing and consumption.\n\n3. **Message Consumption**:\n   - Consumers retrieve notifications from queues and deliver them through the appropriate channels.\n   - Redis ensures only recent and relevant messages are processed.\n\n4. **Integration with External Services**:\n   - Email and SMS are sent using external providers (Mailgun, Omnisend, Twilio, etc).\n\n5. **Analytics and Tracking**:\n   - All notifications are logged with unique IDs in **Firestore**, enabling detailed tracking and reporting.\n\n---\n\n## **GitHub Setup and Usage**\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/karan-kap00r/PingPong.git\n   cd pingpongx\n   ```\n\n2. Build and run the Docker containers:\n   ```bash\n   docker-compose up --build\n   ```\n\n3. Access the API on `http://localhost:8080` and explore the interactive Swagger documentation at `http://localhost:8000/docs`.\n\n4. Configure your environment variables:\n   - Redis and Kafka configurations.\n   - API keys for Mailgun, Twilio, Omnisend, and OneSignal.\n\n5. Enjoy the PingPong.\n\n---\n\n## **PyPI Setup and Usage**\n- To import package:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/import.png)\n- To send notifications by importing python package:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/code.png)\n- To set and get user preferences:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/get_set_UP.png)\n\n---\n## **Usage Via APIs**\n- To SignUp:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/signUp.png)\n- To Login:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/login.png)\n- To Send Notifications:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/send.png)\n- To Get User Preferences:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/getUP.png)\n- To Update User Preferences:\n![Image description](https://raw.githubusercontent.com/karan-kap00r/PingPong/refs/heads/master/static/setUP.png)\n---\n\n## **Why PingPong?**\nPingPong is the ultimate notification management solution for projects demanding:\n- **High performance**: Deliver notifications at lightning speed to millions of users.\n- **Scalability**: Handle growing notification workloads with ease.\n- **Flexibility**: Support for multiple notification channels and user preferences.\n- **Security**: Robust authentication and secure data management.\n\n---\n\n## **Contributions**\nWe welcome contributions to enhance PingPong! Feel free to submit pull requests, open issues, or share feature ideas.\n\n---\n\n## **License**\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).  \n\n---\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A dynamic notification delivery system with Redis and Kafka integration.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/karan-kap00r/PingPong"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bedc9f2618b4a647880bb332a4447cdc53b2112d63e3cd769301637e7bcf9646",
                "md5": "b37aab09aeb3ebc7b4b07cce9a89216a",
                "sha256": "ac866c364c13ae557ce0f7ded79a3d6320ab40dc123e33f38d79ea17fd9a533b"
            },
            "downloads": -1,
            "filename": "pingpongx-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b37aab09aeb3ebc7b4b07cce9a89216a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19740,
            "upload_time": "2024-12-23T14:59:58",
            "upload_time_iso_8601": "2024-12-23T14:59:58.461497Z",
            "url": "https://files.pythonhosted.org/packages/be/dc/9f2618b4a647880bb332a4447cdc53b2112d63e3cd769301637e7bcf9646/pingpongx-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ab21d95f4b4c1657e2c3722acaa13fc7cd41bbf230aa0177bdf150472080877",
                "md5": "ec7410dd21019a5339829b341c6f39ba",
                "sha256": "75d9587d1ecc80c8d157d4ef5fb12ed230882e360fbb9bb804555b2d40f53c0e"
            },
            "downloads": -1,
            "filename": "pingpongx-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "ec7410dd21019a5339829b341c6f39ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17346,
            "upload_time": "2024-12-23T14:59:59",
            "upload_time_iso_8601": "2024-12-23T14:59:59.703012Z",
            "url": "https://files.pythonhosted.org/packages/7a/b2/1d95f4b4c1657e2c3722acaa13fc7cd41bbf230aa0177bdf150472080877/pingpongx-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-23 14:59:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "karan-kap00r",
    "github_project": "PingPong",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.95.2"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    "==",
                    "0.23.1"
                ]
            ]
        },
        {
            "name": "redis",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "kafka-python",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        },
        {
            "name": "google-cloud-firestore",
            "specs": [
                [
                    "==",
                    "2.10.1"
                ]
            ]
        },
        {
            "name": "twilio",
            "specs": [
                [
                    "==",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.4"
                ]
            ]
        },
        {
            "name": "bcrypt",
            "specs": [
                [
                    "==",
                    "3.2.2"
                ]
            ]
        },
        {
            "name": "passlib",
            "specs": [
                [
                    "==",
                    "1.7.4"
                ]
            ]
        },
        {
            "name": "PyJWT",
            "specs": [
                [
                    "==",
                    "2.10.0"
                ]
            ]
        },
        {
            "name": "google-cloud-secret-manager",
            "specs": [
                [
                    "==",
                    "2.22.0"
                ]
            ]
        }
    ],
    "lcname": "pingpongx"
}
        
Elapsed time: 1.98887s