A CLI tool for fetching and printing weather data from the Met Office Weather DataHub API.
Project description
metoffice-weather-cli
A CLI tool for fetching and printing weather data from the Met Office Weather DataHub API.
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 <flags>
.
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
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.
Source Distribution
Built Distribution
Hashes for metoffice-weather-cli-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5f8dac929a1306a7a51773102c69d06b3f529bb57c421fd3c82ad6d5daad03 |
|
MD5 | df177efa4c14ebd359508a55a6e34253 |
|
BLAKE2b-256 | 4d36b57cb4f086cf43e5c212423a61eae8e599b5eeab35cdce24985f338f26e3 |
Hashes for metoffice_weather_cli-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42502446a5dd5b4dfc6a417374baa30179d030387384382632c82fb4ade57054 |
|
MD5 | 3a87aaea0ef188334b631526cd79876d |
|
BLAKE2b-256 | a99f73dd6b6cf6b67bbb226cc2c901bc72d4d7c1bd8b7bc66e49fe28e73d2135 |