https://github.com/cgoldberg/weathercli
today's weather
https://github.com/cgoldberg/weathercli
Last synced: 8 months ago
JSON representation
today's weather
- Host: GitHub
- URL: https://github.com/cgoldberg/weathercli
- Owner: cgoldberg
- Created: 2016-01-24T18:42:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-22T13:32:56.000Z (over 9 years ago)
- Last Synced: 2025-01-11T15:48:08.578Z (9 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# weathercli
### display today's weather
##### Corey Goldberg, 2016
----
#### Development:
* https://github.com/cgoldberg/weathercli
#### Usage:
* `weathercli.py [-h] [ip]`
#### Instructions:
* clone the repo, activate a virtualenv, install requirements, and run!
```
$ git clone https://github.com/cgoldberg/weathercli
$ cd weathercli
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python weathercli.py
```#### Summary:
`weathercli` uses 2 services to get today's weather:
* ip-api.com - geolcation lookup API
* api.openweathermap.org - weather forecast APIThe program makes a call to the geolocation lookup API to get latitude/longitude coordinates of your current IP address (technically, your NAT'ed public IP). If you want to do a lookup for a different IP, supply the address as an argument when invoking the program.
Once location is retrieved, coordinates are sent to the weather forecast API to retrieve today's weather conditions.
The weather data is then formatted and displayed to the user.
---