This python library easily obtains weather data across various locations and dates.
Project description
forecast-weather
This python library easily obtains weather data across various locations and dates.
Overview
forecast-weather
is a library that allows a user to easily obtain weather data (temperatures, pressure, humidity, precipitation, wind, cloud coverage, etc.) across various locations and dates. The library will make calls to a public weather API and will organize the returned data for ease of use. Some extra functionality in consideration include some form of visual plot/graph generation.
Install
pip install forecast-weather
API Key
Go to weatherapi.com to register an account for your free api key. Create a new file ./api_key and paste your api key here.
Usage
import forecast_weather as fw
fw.show_current(location = "10027")
fw.show_forecast(location = "10027", days = "2")
current = fw.get_current(location = "10027")
forecast = fw.get_forecast(location = "10027", days = "3")
Details
This project is a pure python project using modern tooling. It uses a Makefile
as a command registry, with the following commands:
make
: list available commandsmake develop
: install and build this library and its dependencies usingpip
make build
: build the library usingsetuptools
make lint
: perform static analysis of this library withflake8
andblack
make format
: autoformat this library usingblack
make annotate
: run type checking usingmypy
make test
: run automated tests withpytest
make coverage
: run automated tests withpytest
and collect coverage informationmake dist
: package library for distribution
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.