UltraXpert Chat App
Project description
📌 Overview
ultrachatapp is a Python package that provides a real-time chat system using FastAPI. Its primary goal is to enable seamless messaging between experts and customers via WebSockets or REST APIs. You can easily integrate this module into your Django or any other backend project to add robust chat functionality.
🔧 Installation Install the package using pip:
pip install ultrachatapp If you're using Docker:
dockerfile RUN pip install ultrachatapp To install a specific version: pip install ultrachatapp==0.1.1
🧠 Prerequisites Before using ultrachatapp, make sure your environment includes the following:
Python 3.8+
FastAPI or Django-based backend
Redis (used for message queues or pub/sub if needed)
PostgreSQL (or any preferred database, if your project uses models)
Required environment variables (listed below)
🔐 Required Environment Variables
ultrachatapp relies on several AWS-related environment variables, especially if you're storing chat messages, media, or files on Amazon S3.
Ensure your .env file or docker-compose configuration includes the following:
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_STORAGE_BUCKET_NAME=your_bucket_name
AWS_S3_REGION_NAME=your_region
AWS_S3_CUSTOM_DOMAIN=your_s3_domain
FERNET_KEY=your_generated_fernet_key
⚙️ How to Use in Your Project
✅ 1. Import and Use Functions If you're building a chat API in Django or FastAPI, you can directly import the messaging functions:
from ultrachatapp.logic import send_message
You can then use this in your API views or business logic.
✅ 2. WebSocket Integration (FastAPI) If you're using FastAPI and want real-time WebSocket-based chat, simply include the router:
from fastapi import FastAPI from ultrachatapp.routes import chat_router
app = FastAPI()
Include ultrachatapp's WebSocket & HTTP routes
app.include_router(chat_router, prefix="/chat")
🔄 Example: .env.prod and Docker Compose Setup
docker-compose-prod.yml Example:
services: web: build: . env_file: .env.prod environment: - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - FERNET_KEY=${FERNET_KEY} ports: - "8000:8000"
🧪 Testing Locally
Create a simple test script to try out the message function:
from ultrachatapp.logic import send_message
print(send_message(1, 2, "Hello from CLI"))
Or you can start your server and test the /chat/ endpoints via Postman or the browser.
.
🚀 Deployment Tips Docker: Add pip install ultrachatapp in your Dockerfile.
Gunicorn / Uvicorn: Run your FastAPI app with:
uvicorn main:app --host 0.0.0.0 --port 8000 Environment: Make sure your .env file is loaded correctly in production.
Redis: If your chat system uses Redis for pub/sub or background messaging, ensure your Redis URL (redis://...) is configured and accessible.
Project details
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 ultrachatapp-0.1.3.tar.gz.
File metadata
- Download URL: ultrachatapp-0.1.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da1da5f94ed42d53dd1f5b20197589dad4be033b8856f2c3db3d5fe9fbd1e77b
|
|
| MD5 |
4b6eecfc8857f456b26b680834e79b8a
|
|
| BLAKE2b-256 |
c68768c12c862aeb4fa3413faf9916b7809ce214a8e73ea0d85f307abcbf8fc3
|
File details
Details for the file ultrachatapp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ultrachatapp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1061ea59f9a0e244d2370873e1b0c465b05566fbce545836a9419071913d6c47
|
|
| MD5 |
19a0808909fe8af67906e3050d6401fd
|
|
| BLAKE2b-256 |
adecc11f8990f3d9839cfdde1ac9975551b458175dce7653bd7ab0d7298a6d6a
|