Skip to main content

Python library for weather information.

Project description

Project Portfolio: https://github.com/calebyhan/CalebHan

weather-ch

Python library for weather information. Docker library for WeatherAPI. This project is unaffiliated with the official company.

Data from WeatherAPI.

Installation


Use the package manager pip to install weather-ch.

pip install weather-ch

Usage


import weather



weatherAPI = weather.API("API KEY HERE")



# returns current weather in London

weatherAPI.current("London")



# returns 3 day forecast of London

weatherAPI.forecast("London")

Documentation


weather.API(api_key)

API Key

weather.current(q, aqi="no", lang=-1)

Realtime API

weather.forecast(q, days=3, alerts="no", aqi="no", lang=-1)

Forecast API

weather.history(q, dt=-1, lang=-1)

History API

weather.future(q, dt=-1, lang=-1)

Future API

weather.ip(q, lang=-1)

IP Lookup API

weather.astro(q, dt=-1, lang=-1)

Astronomy API

weather.sports(q, lang=-1)

Sports API

weather.timezone(q, lang=-1)

Time Zone API

Contributing


Pull requests are welcome. For major changes, please open an issue first

to discuss what you would like to change.

Please make sure to update tests as appropriate.

License


MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather-ch-0.0.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

weather_ch-0.0.3-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page