Skip to content

Instantly share code, notes, and snippets.

@codepedia-top
Created September 21, 2023 14:47
Show Gist options
  • Select an option

  • Save codepedia-top/f2f2bc39f31b1f9124e4601897a73ab8 to your computer and use it in GitHub Desktop.

Select an option

Save codepedia-top/f2f2bc39f31b1f9124e4601897a73ab8 to your computer and use it in GitHub Desktop.
onthisDay
import streamlit as st
import requests
from datetime import datetime
now = datetime.now()
month = now.month
day = now.day
api_url = 'https://byabbe.se/on-this-day'
response = requests.get(f'{api_url}/{month}/{day}/events.json')
data = response.json()
for i in data['events']:
del i['wikipedia']
st.header(f'{data["date"]}')
st.dataframe(data['events'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment