Code Monkey home page Code Monkey logo

galaxy-explorer's Introduction

galaxy-explorer

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.

Installation

  1. Clone the repository:
git clone https://github.com/Haki-Malai/galaxy-explorer.git
  1. Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  1. Install the required packages:
pip install -r requirements.txt

Usage

Search for a character

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

Generate fake searches

To generate fake searches, use the fake command and specify the number of searches to generate:

python main.py fake 10

View application logs

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

Clear the cache

To clear the cache, use the cache command:

python main.py cache --clean

Test the application

To test the application, use the test command:

python main.py test # or:
python main.py test --coverage

Test the application using Docker

To test the application using Docker, use the following commands:

docker build -t galaxy-explorer .
docker run galaxy-explorer

Help

To view the help message and available options for a command, use the --help option:

python main.py --help

Licence

This project is licensed under the MIT License - see the LICENSE file for details.

galaxy-explorer's People

Contributors

haki-malai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.