I need to push data to a website through their API and I'm trying to find a way to use F-string to pass the variable in the data list but couldn't find a way.
Here's what I've tried so far:
today = datetime.date.today()
tomorrow = today + datetime.timedelta(days = 1)
#trying to pass *tomorrow* value with f-string below
data = f'[{"date": "{tomorrow}", "price": {"amount": 15100}}]'
response = requests.put('https://api.platform.io/calendar/28528204', headers=headers, data=data)
How can I achieve this?