Skip to content

R-100/Rust-Weather-Finder-City

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust-Weather-Finder-City

Rust License

This project is a simple command-line interface (CLI) tool written in Rust that allows users to quickly fetch current weather data for any city. The application uses the OpenWeatherMap API to retrieve data such as temperature, feels-like temperature, and wind speed, displaying it clearly in the terminal. Users can query multiple cities in one session.

Features

  • Interactive CLI application
  • Fetches real-time weather data
  • Displays:
    • Temperature (°C)
    • Feels-like temperature (°C)
    • Wind speed (km/h)
  • Fast and easy to use

Requirements

Installation

git clone https://github.com/your-username/weather-cli.git
cd weather-cli
cargo build

Configuration

Open the env.rs file and insert your API key:

pub const API_KEY: &str = "YOUR_API_KEY";

Usage

cargo run

Then follow the prompts in the terminal:

  • "yes" → enter a city
  • "no" → exit the program

Example Output

Weather data:
Temperature: 21.3°C
Feels-like temperature: 19.8°C
Wind Speed: 10.5 km/h

About

A simple Rust CLI tool to fetch weather data for any city using the OpenWeatherMap API. Displays temperature, feels-like temperature, and wind speed in the terminal. Requirements: Rust & API key

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages