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
File details
Details for the file metoffice_weather_cli-0.1.2.tar.gz
.
File metadata
- Download URL: metoffice_weather_cli-0.1.2.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c8bb7691b37ffe5bbdeebdce45e6a3c95061812d374b8548c9cd543bcc9165d |
|
MD5 | b7813a5c17496de9bcc62d391b35df80 |
|
BLAKE2b-256 | f93b94e5d346c2028bfbf1d25f56d0a2c1e5065f0aad606f07653b072828c2b2 |
File details
Details for the file metoffice_weather_cli-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: metoffice_weather_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed131b5e839b718744ca03416e44b353c0a39b70632b61cbc6bec049da8539c9 |
|
MD5 | b42a2177c75133987d623e2d37a72f22 |
|
BLAKE2b-256 | 2039c18f26b55873ee995cd19c2ee2fd728c175572935a96330dcead61e831d1 |