Skip to content

A small Python script which displays local weather from the Dark Sky API

License

Notifications You must be signed in to change notification settings

mwallace582/i3blocks-weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Weather for i3blocks

A simple python script which uses the Pirate Weather API to get location based weather information to display in i3blocks.

You will need a Pirate Weather API key, which is free and can be obtained easily from the Pirate Weather site. API requests are limited to 20,000 calls per month per key, so running the command every 15 minutes will keep you under that limit presuming it will be running 24/7.

If a location is not provided via the command line, the script will automatically locate you using your IP address. This obviously doesn't work if you use a VPN. In that case, you must specify your location on the command line.

Location data is provided by IP-API.com. They automatically ban any IP address that exceeds 150 requests per minute. You've been warned.

This utility depends on the Weather Icons font package and python-forecastio.

Add the following to your i3blocks.conf file:

[Weather]
command=/path/to/i3blocks-weather.py -f -k <pirate_weather_api_key>
markup=pango
interval=100

Dependencies

pip install geopy
pip install python-forecastio

About

A small Python script which displays local weather from the Dark Sky API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages