Geoid is a lightweight, command-line weather application that provides current weather conditions for any specified city, leveraging the WeatherAPI.com service. Get quick, clear weather insights directly in your terminal.
- Current Weather: Displays real-time temperature, "feels like" temperature, humidity, wind speed, and wind direction.
- City Search: Get weather for any city worldwide by providing its name.
- Unit Toggle: Easily switch between Celsius (default) and Fahrenheit for temperature display.
- Clean CLI Output: Formatted with ASCII art for city names and colored text for readability.
- Secure API Key Handling: Utilizes a
.envfile to securely manage your WeatherAPI.com API key, keeping it out of your main codebase.
git clone https://github.com/your-username/Geoid.git
cd Geoidpython -m venv venv
# On Windows:
.\venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txt-
**Go to WeatherAPI.com
-
**Sign up and get your free API key
In the root directory of your project (same as main.py), create a .env file with the following content:
API_KEYY=YOUR_WEATHERAPI_KEY
BASE_URLL=https://api.weatherapi.com/v1/current.jsonOnce installed and configured, you can run Geoid from your terminal:
# Get weather in Celsius (default)
python main.py "Pune"
# Get weather in Fahrenheit
python main.py "New York" --fahrenheit
# Or using single-letter flag
python main.py "London" -fGeoid uses the following Python libraries:
-
requests: For making HTTP requests -
pyfiglet: For generating ASCII art -
simple-chalk: For colored terminal text -
python-dotenv: For loading environment variables
Contributions are welcome! If you have suggestions for improvements or new features, feel free to:
- Open an issue
- Submit a pull request