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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20fb9524d842d1a38d1379cc77f8b7872f2d4986f82162cd5a590d47d79285fc |
|
MD5 | ff30e2061a531711182f667ceefa2b7f |
|
BLAKE2b-256 | cf7268ab34d668ce00203e0d12f80af715d316f8442d9a3536202bb73a30eee8 |
Hashes for metoffice_weather_cli-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350c575d814b4379db42c063ce1bd03ae2e5047d74c6d9218258375fea9f2023 |
|
MD5 | 40b4600a8eed8c77a858edbb951f2fd0 |
|
BLAKE2b-256 | 6e78119666cc6765a8379fa365bb9fe0870b181787728aa24ef558813566cdd2 |