Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corndogit/metoffice-weather-cli
A CLI tool for fetching and printing weather data
https://github.com/corndogit/metoffice-weather-cli
cli met-office weather
Last synced: 1 day ago
JSON representation
A CLI tool for fetching and printing weather data
- Host: GitHub
- URL: https://github.com/corndogit/metoffice-weather-cli
- Owner: corndogit
- License: gpl-3.0
- Created: 2022-04-01T20:44:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T23:28:10.000Z (5 months ago)
- Last Synced: 2024-11-01T11:04:41.280Z (7 days ago)
- Topics: cli, met-office, weather
- Language: Python
- Homepage: https://pypi.org/project/metoffice-weather-cli/
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metoffice-weather-cli
A CLI tool for fetching and printing weather data from the
[Met Office Weather DataHub API](https://metoffice.apiconnect.ibmcloud.com/metoffice/production/).## Installation
### PyPI
Open the command line and type `python3 -m pip install metoffice-weather-cli`. You can then run the program anywhere
by typing `python3 -m metoffice_weather_cli `.Note: you may need to replace `python3` with your OS's equivalent.
## Usage
To use this program, you must have a Met Office Weather DataHub API key and
a geocode.xyz Auth token (optional, used for geocoding only). These can be added by running the program with
the `-c` flag or manually added in a .env file placed in the `metoffice-weather-cli` package directory as such:
```
DATAHUB_API_KEY=xxxxxxxx
DATAHUB_SECRET=xxxxxxxx
GEOCODE_AUTH=xxxxxxxx
```
Run `python3 -m metoffice_weather_cli` in the command line (optionally with the `-h` flag) to view the help page.## Todo
- Pick all 'useful' information out of the Met Office data - some is currently omitted
- Allow preferences to be set in a config file for the data printed out
- Switch from .env-based saving of API keys to another format (e.g. JSON) to avoid wiping files containing
environment variables unrelated to the program