Skip to main content
100%

Gist 99774fc136a57a61654393793e16488e

✓ Published0🌍 Public
CConorAspell
Last edited Dec 10, 2023
Created on Dec 5, 2023

This example shows an automated transfer system for the Fantasy Premier League game, executing player swaps between gameweeks. A Python AWS Lambda function orchestrates the process by retrieving incoming and outgoing player data from JSON files stored in an S3 bucket, then posts the transfer request via the `requests` library to the league’s `https://fantasy.premierleague.com/api/transfers/` endpoint. The function constructs a transfer payload with player IDs, purchase and selling prices, and the user’s gameweek, along with authentication cookies. It uses the `fpl_utils` module to fetch gameweek information and manage failure notifications via SNS.

AI-generated description

Similar vizzes