Skip to main content
100%

Gist a4e9165ec14c57fbdc0ca88f9a23ba86

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

This example shows a serverless health check for a fantasy football league deadline. It compares the next fixture deadline to the current time, returning a boolean that indicates whether the deadline is within the next 24 hours. The code fetches fixture data from the Fantasy Premier League’s `bootstrap-static` API, converts the response to a pandas DataFrame, and filters records by Epoch timestamps. If the deadline is too far away, it calculates the time remaining (days, hours, minutes) and sends a failure notification via an AWS Lambda handler using the `fpl_utils` library’s SNS topic.

AI-generated description

Similar vizzes