Metadata-Version: 2.1
Name: Weather-API-MASI
Version: 0.4
Description-Content-Type: text/markdown

# Weather_API_MASI

Weather_API_MASI is a Python library for retrieving hourly weather and AQI (Air Quality Index) data.

Output/data is given in csv files.

## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install Weather_API_MASI.

```bash
pip install Weather-API-MASI
```

## Usage

```python
from Weather_API_MASI import Weather

# make a Weather object with two required parameters (city and start date) and one optional parameter (end date of a range)
# date is in YYYY-MM-DD format
# If provided, the third parameter needs to be in the same year as the start date

obj1 = Weather("nashville", "2025-02-20")
obj2 = Weather("los angeles", "2023-11-23", "2023-12-23")

# can generate hourly data on obj1 and obj2
obj1.generate_hourly_data()

# can generate hourly data in an entire year on obj1 and obj2
obj1.generate_yearly_hourly_data()

# can generate AQI data on obj1 and obj2
obj1.generate_AQI_data()

# can generate hourly data within a time frame only on obj2 
obj2.generate_hourly_data_range()
```

## CLI Command

You can use command line interface (CLI) for this package.
**Weather-API-MASI {city} {start date} {end date}**
end date is optional.

This CLI command will provide AQI data as well as hourly data on a single day and an entire year.
Depending on the third optional parameter, hourly data in a time range will also be provided.

```bash
Weather-API-MASI nashville 2025-02-20
```
```bash
Weather-API-MASI "los angeles" 2023-11-23 2023-12-23
```
