Skip to content

veddevv/vgde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vgde (Video Game Data Explorer)

vgde is a Python tool for quickly exploring and fetching information about video games using the RAWG Video Games Database API. Enter the name of a game, and vgde provides details such as the release date, rating, description, and more—all right from your terminal.


Features

  • Fetches Live Game Data
    Retrieves up-to-date video game information from the RAWG API.
  • Rich Output
    Displays game name, release date, rating, description, and a background image URL.
  • Flexible Input
    Use interactive prompts or pass the game name directly as a command-line argument.
  • Robust Error Handling
    Gracefully handles network issues, invalid input, and missing API key scenarios.
  • Developer Mode
    Enable detailed debug logging for troubleshooting and development.
  • Clean Description Display
    Removes HTML tags for readable output; truncates lengthy descriptions.
  • Configurable Timeout
    Set request timeout duration via environment variables.

🛠 Requirements


🚀 Installation

  1. Clone the repository

    git clone https://github.com/veddevv/vgde.git
    cd vgde
  2. Install dependencies

    pip install -r requirements.txt

⚡️ Usage

  1. Set your RAWG API key
    Obtain a free API key from RAWG and set it as an environment variable:

    export RAWG_API_KEY='your_api_key_here'
  2. Run vgde

    • Interactive mode
      python vgde.py
    • Direct mode
      python vgde.py "The Witcher 3"

⚙️ Configuration

vgde can be customized via the following environment variables:

Variable Required Description Default
RAWG_API_KEY Yes Your RAWG API key
DEVELOPER_MODE No Set to true, 1, or t to enable verbose debug logging false
REQUEST_TIMEOUT No Timeout in seconds for API requests 10

Example:

RAWG_API_KEY='your_key' DEVELOPER_MODE=true REQUEST_TIMEOUT=15 python vgde.py "Portal 2"

📝 Example Output

Game: The Witcher 3: Wild Hunt
Released: 2015-05-18
Rating: 4.67 / 5
Description: The Witcher 3: Wild Hunt is a story-driven, open world adventure...
Background Image: https://media.rawg.io/media/games/...

🐞 Troubleshooting

  • Missing API Key:
    Make sure you've set your RAWG_API_KEY environment variable.
  • No Results Found:
    Try a different or more specific game name.
  • Timeouts or Network Errors:
    Check your internet connection, or increase REQUEST_TIMEOUT.

About

This Python script fetches and displays information about video games using the RAWG API.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages