geeksiddhant commited on
Commit
61bbc50
·
verified ·
1 Parent(s): a4cc4df

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from notion_client import Client
3
+
4
+ notion_api_key = os.environ.get("NOTION_API_KEY")
5
+
6
+ notion = Client(auth=notion_api_key)
7
+
8
+ page_id = '67dd09be5b3b44d694996a75c07ecc26'
9
+
10
+ response = notion.pages.retrieve(page_id=page_id)
11
+
12
+ response_body = notion.blocks.children.list(
13
+ block_id=page_id
14
+ )
15
+
16
+
17
+ import streamlit as st
18
+
19
+ st.title(response['properties']['title']['title'][0]['plain_text'])
20
+
21
+ st.write(response_body['results'][1]['paragraph']['rich_text'][0]['plain_text'])