The Power Activation Gateway is a backend service designed to manage and activate the powers of the 'Infinity Stones'. Users can interact with the service to activate the unique powers of each stone, with real-time updates provided through WebSockets. The service is built using Flask, Celery, and Flask-SocketIO.
To set up the project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/sattyamjjain/PyVerseAI.git cd Power-Activation-Gateway
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
Update the database URL and Celery configurations in the config.yaml
.
- Activate Stone Power:
POST /activate
- Parameters:
stone_id
: The unique identifier of the stone.user_id
: The ID of the user making the activation request.power_duration
: The duration (in seconds) the power should remain active.
- Parameters:
- Connect: Establish a WebSocket connection.
- Disconnect: Disconnect from the WebSocket server.
- Authenticate: Send authentication credentials.
- Activation Update: Receive real-time updates on stone power activations.
-
Start the Flask application:
python3 main.py
-
Start the Celery worker:
celery -A main.celery worker --loglevel=info
-
Start the WebSocket client (optional):
python socket_client.py
Describe how to run the automated tests for this system.