A Python-based weather application that combines real-time weather data with OpenAI-powered clothing suggestions. The app provides current weather information and personalized clothing recommendations based on weather conditions.
- Weather Information: Get real-time weather data for any city worldwide
- Smart Clothing Suggestions: Receive AI-powered clothing recommendations based on current weather
- Location Support: Global coverage with city and country-based location search
- Current Conditions: Display temperature and wind speed information
- Interactive Menu: User-friendly command-line interface
- Python 3.12.3
- Requests library for API interactions
- OpenAI API for clothing suggestions
- API Ninjas for geocoding
- Open-Meteo API for weather data
- UV package manager for dependency management
-
Clone the repository
git clone [git@github.com:rtaran/ai-clothing-advisor.git] cd weather-app -
Set up virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install required packages
# Install uv if not already installed pip install uv # Install dependencies using uv uv pip install -r requirements.txt
-
Set up environment variables
- Copy
.env.exampleto.env - Add your API keys:
API_GEO_KEY=your_api_ninjas_key API_OPENAI_KEY=your_openai_key
- Copy
-
Run the application
python main.py
-
Follow the prompts
- Enter city name
- Enter country name
- Use the menu to access different features
-
Available Options
- Get coordinates
- Get current weather
- Display weather information
- Get clothing suggestions
- View weekly forecast
- Export data to CSV
- Get coordinates
- Get current weather
- Display weather info
- Suggest clothing
- Get weekly forecast
- Export DB to CSV
- Exit
This application requires two API keys to function:
- API Ninjas key for geocoding (Get it from API Ninjas)
- OpenAI API key for clothing suggestions (Get it from OpenAI)
weather-app/ ├── main.py # Main application file ├── weather_oop.py # Weather class implementation ├── .env # Environment variables (not in repo) ├── .env.example # Example environment file ├── requirements.txt # Project dependencies └── README.md # Project documentation
Contributions are welcome! Feel free to submit issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For adding new dependencies to the project: