Skip to content

Process that every secific time get and publish weather data from Cercedilla in Twitter through Google Cloud Platform technology. A Cloud Function that get the weather data and publish it, and a Cloud Scheduler that every X time call the Cloud Function.

License

Notifications You must be signed in to change notification settings

falken20/parrao_weather_bot

Repository files navigation

drawing Personal Portfolio web

Version GitHub language count GitHub Top languaje Test coverage GitHub License

Richi web Twitter


Process that every secific time get and publish weather data from Cercedilla in Twitter through Google Cloud Platform technology. A Cloud Function that get the weather data and publish it, and a Cloud Scheduler that every X time call the Cloud Function.

Deploy
It has to copy the content of parrao_weather_bot.py file in Cloud Function 
section in Google Cloud Platform, inside main.py file.

OR

Execute Build trigger in Google Console when push repo
Setup
pip install -r requirements.txt
Setup Tests
pip install -r requirements-tests.txt
Running the app
python ./parrao_weather_bot.py
Running the tests with pytest and coverage
./scripts/check_project.sh
Environment vars
ENV_PRO=N
LOG_LEVEL=INFO

# Weather station API key
API_KEY=XXXXXXXXXXXX
STATION_ID=XXXXXXXXXXXX

# Twitter params
CONSUMER_KEY=XXXXXXXXXXXX
CONSUMER_SECRET=XXXXXXXXXXXX
ACCESS_TOKEN=XXXXXXXXXXXX
ACCESS_TOKEN_SECRET=XXXXXXXXXXXX

Doc API wunderground.com

API General doc: https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit API Current conditions: https://ibm.co/v2PWSCC

Versions
  • 1.4.1 Python version of Cloud Functions raise to Python 3.10
  • 1.4.0 Twitter API 2.0
  • 1.3.1 cloudbuild.yaml to deploy functions
  • 1.3.0 Saving daily data in DB
  • 1.2.0 Add new cron for tweet daily resume
  • 1.1.0 Change the data source to personal weather station
  • 1.0.0 First version
Learning tips
  • Google Cloud Build
  • Google Cloud Functions
  • Google Cloud Scheduler
  • SqlAlchemy

About

Process that every secific time get and publish weather data from Cercedilla in Twitter through Google Cloud Platform technology. A Cloud Function that get the weather data and publish it, and a Cloud Scheduler that every X time call the Cloud Function.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published