Skip to content

Redis Integrated

Latest
Compare
Choose a tag to compare
@Sushant0999 Sushant0999 released this 27 Oct 13:25

CLI Weather Application with Redis Caching

This repository hosts a simple Command-Line Interface (CLI) application that provides real-time weather information for selected cities and caches data using Redis to improve performance and reduce redundant API calls. The application is written in Java and uses a weather API to fetch live weather data.

Features

  • City-based Weather Lookup: Fetches and displays current weather details (temperature, humidity, condition, etc.) for specified cities.
  • Redis Caching: Implements Redis to cache weather data, minimizing API calls for frequently queried cities and expiring old data after a set time.
  • Environmental Configuration: Uses .env files to manage API keys and Redis connection details for secure configuration.
  • Efficient CLI Design: Interactive CLI provides an intuitive way to access weather data and displays cached results if available.

Requirements

  • Java (version 11 or above)
  • Redis server (for caching data)
  • Weather API Key from a provider (such as OpenWeatherMap or WeatherAPI)

Getting Started

  1. Clone this repository and navigate to the project directory.
  2. Configure your .env file with your Redis credentials and API key.
  3. Start the Redis server, then run the application from the CLI.

Usage

java -jar weather_cli_app.jar

This application is ideal for those learning Java and exploring Redis caching strategies in simple CLI applications.