Galaxy Explorer is a python program for searching Star Wars API, featuring caching and visualization of past search results. This command line interface allows you to search for characters in the Star Wars API and generate fake searches. You can also view the application logs by plotting the results or time. Additionally, you can print the cache and clear it if desired.
- Clone the repository:
git clone https://github.com/Haki-Malai/galaxy-explorer.git
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the required packages:
pip install -r requirements.txt
To search for a character, use the search command:
python main.py search "Luke Skywalker"
You can also choose to print the character's home world or raise errors and warnings:
python main.py search "Leia Organa" --world --verbose
To generate fake searches, use the fake command and specify the number of searches to generate:
python main.py fake 10
To view the application logs, use the plot command and specify whether to visualize the results or time:
python main.py plot
python main.py plot --results
python main.py plot --time
To clear the cache, use the cache command:
python main.py cache --clean
To test the application, use the test command:
python main.py test # or:
python main.py test --coverage
To test the application using Docker, use the following commands:
docker build -t galaxy-explorer .
docker run galaxy-explorer
To view the help message and available options for a command, use the --help option:
python main.py --help
This project is licensed under the MIT License - see the LICENSE file for details.