Metadata-Version: 2.1
Name: simple-weather-api-by-ys
Version: 0.1.2
Summary: This is a simple Flask API that provides real-time weather information for a specified city. The API is integrated with the Weatherstack service to fetch accurate and up-to-date weather data.
Home-page: https://github.com/Stranger-odua/simple-weather-api-by-ys
Author: YourShadow
Author-email: rooderuler@gmail.com
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: blinker==1.7.0
Requires-Dist: certifi==2024.2.2
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: click==8.1.7
Requires-Dist: colorama==0.4.6
Requires-Dist: Flask==3.0.2
Requires-Dist: idna==3.6
Requires-Dist: itsdangerous==2.1.2
Requires-Dist: Jinja2==3.1.3
Requires-Dist: MarkupSafe==2.1.5
Requires-Dist: requests==2.31.0
Requires-Dist: urllib3==2.2.1
Requires-Dist: Werkzeug==3.0.1

```markdown
# Weather Information API

This is a simple Flask API that provides real-time weather information for a specified city. The API is integrated with the Weatherstack service to fetch accurate and up-to-date weather data.

## Getting Started

These instructions will help you set up and run the Weather Information API on your local machine.

### Prerequisites

- Python (version 3.6 or higher)
- Flask
- Requests library

Install the required dependencies using the following command:

```bash
pip install Flask requests
```

### API Key

To use this API, you need to obtain an API key from Weatherstack. Visit [Weatherstack](https://weatherstack.com/) to sign up and get your API key.

### Configuration

Open the `app.py` file and replace `'YOUR_API_KEY'` with your actual Weatherstack API key.

```python
# Weatherstack API key (replace 'YOUR_API_KEY' with your actual API key)
API_KEY = 'YOUR_API_KEY'
```

### Running the API

Run the Flask application using the following command:

```bash
python main.py
```

The API will be accessible at `http://127.0.0.1:5000/weather`.

## API Endpoints

### Get Weather Information

- **Endpoint:** `/weather`
- **Method:** `GET`
- **Parameters:**
    - `city` (required): The name of the city for which you want to get weather information.

Example Request:

```bash
curl http://127.0.0.1:5000/weather?city=London
```

Example Response:

```json
{
  "city": "London",
  "temperature": 15,
  "conditions": "Partly cloudy"
}
```

## Error Handling

- If the city parameter is not provided, the API will return a `400 Bad Request` error.

```json
{
  "error": "City parameter is required"
}
```

- If the specified city is not found, the API will return a `404 Not Found` error.

```json
{
  "error": "City not found"
}
```

## Acknowledgments

- Flask: [Flask Documentation](https://flask.palletsprojects.com/)
- Weatherstack: [Weatherstack API Documentation](https://weatherstack.com/documentation)

Feel free to customize this README based on your specific project structure and additional features.
