This project aims to assist Professor Charles Xavier in identifying mutants based on their DNA sequences, in order to recruit them for his school to combat the Sentinels. The API detects whether a person is a mutant by analyzing their DNA sequence.
License: MIT
Programming Language: PythonCloud Services:- AWS Lambda
- AWS EventBridge
- AWS API Gateway
Database: MongoDB Atlas
-
Python download and install python 3.10
-
Mongodb To use MongoDB, you need to create a database in the MongoDB Cloud. You can sign up for a free version at the following link: MongoDB Atlas Registration, generate a mongo uri and configure Network Access
Go to the AWS Management Console and navigate to the "EventBridge" service. If you haven't created an event bus yet, you can create a new one. Next, create a new rule. Configure the event pattern with the following JSON: json
{
"source": [
"my-application"
],
"detail-type": [
"mutant-detected"
]
}
Define the target action of the rule as a Lambda function that will process the events.
Go to the AWS Management Console and search for the "Lambda" service. Create a new Lambda function. Use the code found in the lambda_function folder of your repository as the source code for the Lambda function. This code should capture the event it receives from EventBridge and send it to the MongoDB Cloud database.
- Clone the repository:
git clone https://github.com/ccasllo/mutantes.gitcd mutantes
- Install Python Virtual Environment:
python3 -m venv venv- Activate the Virtual Environment:
source venv/bin/activate- Install Required Packages:
pip install -r requirements.txt- configure variables.
Create a file named
.envand add the necessary variables following the format provided inexample.env
.envand excute .env
export $(cat .env)- execute
uvicorn config.main:app --reload- Assign Execution Permissions to the Script:
chmod +x execute_test.sh
- Execute the Unit Tests:
sh execute_test.sh
Carlos Castillo Project Link: https://github.com/ccasllo/mutantes.git