A package for synchronizing data in Notion Database through Notion official api.
Project description
Notion Database Bot
Notion-Database-Bot is a python tool for synchronizing data in Notion Database through Notion official api. The main purpose is to facilitate the recording of daily experimental data.
Installation
pip install notion-database-bot
Prerequisites
-
Create an integration, then you can get your own Internal Integration Token (
token
). -
Get your target database ID (
database_id
):Here's a quick procedure to find the database ID for a specific database in Notion:
Open the database as a full page in Notion. Use the Share menu to Copy link. Now paste the link in your text editor so you can take a closer look. The URL uses the following format:
https://www.notion.so/{workspace_name}/{database_id}?v={view_id} Find the part that corresponds to {database_id} in the URL you pasted. It is a 36 character long string. This value is your database ID. Note that when you receive the database ID from the API, e.g. the search endpoint, it will contain hyphens in the UUIDv4 format. You may use either the hyphenated or un-hyphenated ID when calling the API.
Usage
-
Init your Bot:
from notion_database_bot import NotionDatabaseBot bot = NotionDatabaseBot(token)
-
Read database content:
content = bot.read_database(database_id)
-
Add a page/row/sample to database
temp_dict = {"Model": "bert-base-uncased", "ppl": "5.21"} properties = bot.dict2properties(temp_dict, "Model") bot.create_page(database_id, properties)
References:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for notion_database_bot-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40f0e0b4c56aa73523e4f4a024790f3a24b2a12b882483333ad62853c94d0ed4 |
|
MD5 | d1540a2222a718687765d31fbfcf652b |
|
BLAKE2b-256 | 8ae86a0fd93acd4054bf02cbea56bc11642befc6227ef1034d2e87f5c27ece96 |
Hashes for notion_database_bot-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2612df4ceb5f9c19ef9eda0f45e8bfb140dba36409d073f1c3690aabd5fe73f8 |
|
MD5 | b216a1af7de98193a39f68d9d0dba97c |
|
BLAKE2b-256 | a1170db150d4bc41ee0af4a77b9c5e043b8893d7a80836c3d0cd6f71ab124b87 |