项目作者: andrewjprice

项目描述 :
Emails a notification when new transactions occur in your Yahoo Fantasy Football League.
高级语言: Python
项目地址: git://github.com/andrewjprice/yahoo-fantasy-football-transaction-notification.git


Yahoo Fantasy Football Transaction Email Notification

Uses YFPY, MongoDB, and Heroku’s cronjob clock process to email reports when new transactions occurs.

Setup

Make sure Python3 is installed.

Create a virtual environment and install the dependencies.

  1. venv env
  2. source env/bin/activate
  3. pip install -r requirements.txt

Create an .env file using the following variables.

  1. consumer_key=
  2. consumer_secret=
  3. mongodb=
  4. receiver_email=
  5. sender_email=
  6. sender_password=
  7. league_id=

You will need to register your app at Yahoo Developer to obtain a consumer_key and consumer_secret.

You will also need a MongoDB database connection string. Sign up at MongoDB to setup a free cluster.

Heroku Deployment

Before deploying you will need to manually authenticate the app with Yahoo. This will generate a token.json file required to make requests.

Create a Heroku app and a clock process. By default the job will run every 30 seconds and can be configured in job.py.

  1. heroku create
  2. git push heroku master
  3. heroku ps:scale clock=1
  4. heroku logs --tail