Weather station automatization reports using with Github Actions and X (also knowing as Twitter in the past) daily report publication process.
The information is obtained from Weather Underground platform. Launching HTTP request over the Web API to get information about the weather information sent by our weather station.
Finally it´s reported in X platform:
- X (Twitter) profile: ⛅Tiempo Castrocontrigo✌️
Here, a picture about the weather station 📸
- Recommended create python virtual environment and install requirements.txt packages.
python -m venv venv
.\venv\Scripts\activate
pip install -r .\requirements.txt
Note: scripts using by default environment variables but, you can use also input arguments.
- Get report about weather station and print in console.
python .\src\weather-station\test\morning_daily_scheduler.py `
--weather_underground_station_id <WEATHER_UNDERGROUND_STATION_ID> `
--weather_underground_api_key <WEATHER_UNDERGROUND_API_KEY>
- Get report from previous day and publish tweet in X (Twitter) platform.
python .\src\weather-station\post_morning_daily_tweet_in_x.py `
--weather_underground_station_id <WEATHER_UNDERGROUND_STATION_ID> `
--weather_underground_api_key <WEATHER_UNDERGROUND_API_KEY> `
--x_api_key <X_API_KEY> `
--x_api_key_secret <X_API_KEY_SECRET> `
--x_access_token <X_ACCESS_TOKEN> `
--x_access_secret_token <X_ACCESS_SECRET_TOKEN>
python .\src\weather-station\test\run_unit_tests.py