This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from fpl_utils import fpl_utils | |
def lambda_handler(event, context): | |
try: | |
user_id = event['user_id'] | |
pl_profile = event['pl_profile'] | |
cookie = f"pl_profile={pl_profile};" | |
bucket_name = fpl_utils.get_parameter('fpl_bucket_name') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from fpl_utils import fpl_utils | |
def lambda_handler(event, context): | |
try: | |
pl_profile = event['pl_profile'] | |
cookie = f"pl_profile={pl_profile};" | |
bucket_name = fpl_utils.get_parameter('fpl_bucket_name') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from fpl_utils import fpl_utils | |
import os | |
def lambda_handler(event, context): | |
try: | |
pl_profile = event['pl_profile'] | |
cookie = f"pl_profile={pl_profile};" | |
update_team(event['user_id'], cookie) | |
return event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from fpl_utils import fpl_utils | |
import os | |
def lambda_handler(event, context): | |
try: | |
pl_profile = event['pl_profile'] | |
cookie = f"pl_profile={pl_profile};" | |
update_team(event['user_id'], cookie) | |
return event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from fpl_utils import fpl_utils | |
import os | |
def lambda_handler(event, context): | |
try: | |
pl_profile = event['pl_profile'] | |
cookie = f"pl_profile={pl_profile};" | |
calc_player_out(event['user_id'], cookie) | |
return event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
import boto3 | |
from fpl_utils import fpl_utils | |
import os | |
def lambda_handler(event, context): | |
try: | |
bucket_name = fpl_utils.get_parameter('fpl_bucket_name') | |
players_df, fixtures_df, gameweek = get_data(bucket_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import pandas as pd | |
from datetime import datetime | |
import boto3 | |
import io | |
import boto3 | |
def get_parameter(parameter): | |
ssm = boto3.client('ssm', 'eu-west-1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment": "Control FPL Update", | |
"StartAt": "DateChecker", | |
"States": { | |
"DateChecker": { | |
"Type": "Task", | |
"Resource": "arn:aws:lambda:eu-west-1:$AWS_NUMBER:function:DateChecker", | |
"InputPath": "$", | |
"ResultPath": "$.functionResult", | |
"OutputPath": "$", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import os | |
import requests | |
import json | |
from datetime import datetime | |
from fpl_utils import fpl_utils | |
def lambda_handler(event, context): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
import requests | |
import json | |
import pandas as pd | |
from fpl_utils import fpl_utils | |
def lambda_handler(event, context): | |
today = datetime.now() | |
players = requests.get('https://fantasy.premierleague.com/api/bootstrap-static/') |
NewerOlder