{"id":13737640,"url":"https://github.com/tvst/notionlit","last_synced_at":"2026-02-17T21:45:18.087Z","repository":{"id":40495178,"uuid":"429890413","full_name":"tvst/notionlit","owner":"tvst","description":"Write Streamlit apps using Notion! (Prototype)","archived":false,"fork":false,"pushed_at":"2022-08-17T00:32:01.000Z","size":25,"stargazers_count":27,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-15T06:32:14.403Z","etag":null,"topics":["notion-api","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-19T18:01:29.000Z","updated_at":"2024-06-08T17:36:54.000Z","dependencies_parsed_at":"2022-08-09T22:12:30.140Z","dependency_job_id":null,"html_url":"https://github.com/tvst/notionlit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvst%2Fnotionlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvst%2Fnotionlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvst%2Fnotionlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvst%2Fnotionlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvst","download_url":"https://codeload.github.com/tvst/notionlit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253095808,"owners_count":21853481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notion-api","streamlit"],"created_at":"2024-08-03T03:01:55.855Z","updated_at":"2026-02-17T21:45:13.061Z","avatar_url":"https://github.com/tvst.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Streamlit + Notion test app\n\nWrite Streamlit apps using Notion!\n\n☠️ **IMPORTANT:** This is just a little prototype I made to play with some ideas. Not meant for production!\n\n* Example app: https://notionlit.streamlitapp.com/\n* Notion page with source code: https://www.notion.so/streamlit/NotionLit-d500932b258b43298b509eb6dd3db230\n\n  👉 **Try editing the Notion page, then going to the app and pressing `R` to refresh!**\n\n# Forking instructions\n\n1. Fork this app into your own repo\n   (or just copy `streamlit_app.py`. It's fully self-contained!)\n\n1. Create [a new integration in Notion](https://www.notion.so/my-integrations).\n   When you're done, grab the secret token as you'll need it later.\n\n1. Create a page in Notion, then:\n   1. Share it with your integration\n   1. Grab the page URL as you'llneed it later.\n\n1. Deploy your app with [share.streamlit.io](https://share.streamlit.io/).\n\n1. [Set up your app's secrets](https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management),\n   adding in the secret token and page URL from the steps above.\n   ```\n   [notion]\n   token = \"YOUR_NOTION_SECRET\"\n   page_url = \"YOUR_NOTION_PAGE_URL\"\n   ```\n\n**🥳 Done!**\n\nNow any time you edit your Notion page, go into your Streamlit app and press `R` to rerun it\n(thereby fetching the latest content from Notion).\n\n\n# But wait, there's more!\n\nIf you add a code block in Notion **and mark it as a Python block,** it will actually get executed\nwhen you load your app!\n\nSo try adding a Python block with this into your Notion page:\n\n```\nimport streamlit as st\nimport numpy as np\n\nnum_rows = st.slider(\"Number of rows\", 1, 500, 100)\ndata = np.random.randn(num_rows, 5)\n\nst.write(data)\nst.line_chart(data)\n```\n\n(If you need other Python packages, add them to your `requirements.txt`)\n\nOne more thing: let's say you want to execute Python code, but don't want to\npollute your Notion page with too much ugly code. There's a hack for that.\nJust put the code inside an expander **without a title or with a title equal to \"Code\".**\n\n\n# What's supported\n\n* Headers\n* Paragraphs (with bold/italic/strikethrough/links)\n* Images\n* Code blocks\n* Expanders\n* @user_mentions\n* @date_mentions\n\nAnd that's all ☹️\n\nAgain, this is just a proof-of-concept / prototype. So I didn't implement a bunch of other stuff,\nlike underline, @page_mentions, columns, etc.\n\nAlso note that not everything in Streamlit is supported either. I\ndon't have an exhaustive list but, for example,\n[magic](https://docs.streamlit.io/library/api-reference/write-magic/magic) doesn't work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvst%2Fnotionlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvst%2Fnotionlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvst%2Fnotionlit/lists"}