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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notion_database_bot-0.0.5.tar.gz.
File metadata
- Download URL: notion_database_bot-0.0.5.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f0e0b4c56aa73523e4f4a024790f3a24b2a12b882483333ad62853c94d0ed4
|
|
| MD5 |
d1540a2222a718687765d31fbfcf652b
|
|
| BLAKE2b-256 |
8ae86a0fd93acd4054bf02cbea56bc11642befc6227ef1034d2e87f5c27ece96
|
File details
Details for the file notion_database_bot-0.0.5-py3-none-any.whl.
File metadata
- Download URL: notion_database_bot-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2612df4ceb5f9c19ef9eda0f45e8bfb140dba36409d073f1c3690aabd5fe73f8
|
|
| MD5 |
b216a1af7de98193a39f68d9d0dba97c
|
|
| BLAKE2b-256 |
a1170db150d4bc41ee0af4a77b9c5e043b8893d7a80836c3d0cd6f71ab124b87
|