Metadata-Version: 2.1
Name: open-weather-flask
Version: 0.1.2
Summary: A Python Flask API to fetch weather data
Home-page: https://github.com/testinapps/python-weather-app
Author: Yoad Paket
Author-email: heyyoad@gmail.com
Project-URL: Bug Tracker, https://github.com/testinapps/python-weather-app/issues
Project-URL: Documentation, https://github.com/testinapps/python-weather-app/wiki
Project-URL: Source Code, https://github.com/testinapps/python-weather-app
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi==2024.8.30
Requires-Dist: charset-normalizer==3.4.0
Requires-Dist: idna==3.10
Requires-Dist: requests==2.32.3
Requires-Dist: urllib3==2.2.3
Provides-Extra: dev
Requires-Dist: flake8==6.1.0; extra == "dev"
Requires-Dist: black==23.9.1; extra == "dev"
Requires-Dist: pytest==8.3.4; extra == "dev"
Requires-Dist: pytest-mock==3.14.0; extra == "dev"


# Open Weather Flask

Open Weather Flask is a Python-based application that retrieves and displays real-time weather information for specified locations. It provides an API that fetches current weather data using the OpenWeatherMap API.

## Features

- Fetches real-time weather data for any specified location.
- Provides a RESTful API for programmatic access to weather information.

## Requirements

- Python 3.6 or higher
- OpenWeatherMap API key

## Installation

1. **Clone the Repository**:
   ```bash
   git clone https://github.com/testinapps/open-weather-flask.git
   cd open-weather-flask
   ```

2. **Set Up a Virtual Environment** (optional but recommended):
   ```bash
   python -m venv venv
   # Activate the virtual environment:
   source venv/bin/activate
   ```

3. **Install Dependencies**:
   ```bash
   pip install .
   ```

4. **Configure the API Key**:
   - Obtain a free API key from [OpenWeatherMap](https://openweathermap.org/).
   - Set the `OPENWEATHER_API_KEY` environment variable with your API key:
     ```bash
     export OPENWEATHER_API_KEY=your_api_key_here
     ```

## Usage

1. **Run the Application**:
   ```bash
   python -m weather_fetcher
   ```

2. **Access the API**:
   - Use tools like `curl` or Postman to interact with the API.
   - Example:
     ```bash
     curl "http://127.0.0.1:5000/weather?location=New York"
     ```
   - The API will return JSON with current weather data for the specified location.

## Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
