https://github.com/gpskwlkr/weather-cli-python
Simple CLI instrument for getting weather forecast.
https://github.com/gpskwlkr/weather-cli-python
Last synced: 8 months ago
JSON representation
Simple CLI instrument for getting weather forecast.
- Host: GitHub
- URL: https://github.com/gpskwlkr/weather-cli-python
- Owner: gpskwlkr
- Archived: true
- Created: 2019-01-02T14:51:15.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T09:55:53.000Z (almost 7 years ago)
- Last Synced: 2025-03-02T13:50:59.863Z (10 months ago)
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weather CLI - Python
# Used
https://darksky.net - for getting current weather & temperature.
https://ipinfo.io/ - for getting location by IP.
https://locationiq.com - for gettig coordinates of current location.
# Modules
Click - as parser for command line arguments, requests & json.
# Usage
```python
python3 main.py current # May be inaccurate because of getting location by IP
```
# Or
```python
python3 main.py New-York # or any other city
```
# For better user experience
Add an alias to .bashrc via
```python
nano ~/.bashrc
# add this line in the end
alias weather='python3 path/to/script/main.py'
# and activate it
source ~/.bashrc
```
And use then via alias
```python
weather New-York
```
# Result example
```python
The weather in New-York is - Overcast
Temperature is - 4 C
```