To run this project, you need the following API keys:
- OpenAI API Key: Obtain an API key by signing up at OpenAI.
- Riot API Key: Obtain an API key by signing up at Riot Games Developer Portal.
- Docker & Docker-Compose:
- Docker: Required to run MongoDB in a containerized environment. Download and install it from Docker Desktop.
- Docker-Compose: A tool for defining and running multi-container Docker applications. It usually comes with Docker but if needed, install it separately by following Docker-Compose Installation.
- Mongo Tools: Mongo Tools Download .msi
Once you have the keys, add them to the .env file as follows:
OPENAI_API_KEY=your_openai_api_key_here
RIOT_API_KEY=your_riot_api_key_here
MONGO_URI=# Windows command line
python -m venv .venv
.venv\Scripts\activate
# Windows Git Bash
python -m venv .venv
source .venv/Scripts/activate
# MacOS, Linux and Git Bash
python -m venv .venv
source .venv/bin/activatepip install -r requirements.txtcp .env.example .envYou can temporarily set the PYTHONPATH to include the src directory. This ensures that Python knows where to find your modules.
For Windows:
set PYTHONPATH=srcFor MacOS, Linux and GitBash:
export PYTHONPATH=srcOptional (Not Recommended): Add PYTHONPATH Permanently
You can permanently add the src directory to your Python path in your shell configuration file:
export PYTHONPATH=$PYTHONPATH:/path/to/srcmkdir data
mkdir vizTest the setup by running one of the scripts:
python src/scripts/test.pyThe project includes a docker-compose.yml file that sets up MongoDB.
Run the following command in the project root:
docker-compose up -dYou need to download the backup file (games_mongo.gz) and import it into MongoDB.
- Copy
games_mongo.gzinto the project root directory. - Run the following command to restore the database:
mongorestore --gzip --archive=/games_mongo.gz --nsInclude=embedded-rift.games