Notion API Database Python Implementation
Reason this release was yanked:
Stable version 1.0.0 has been released. Install that version only if migration is not possible.
Project description
Python Notion Database
Notion API Database Python Implementation
created only by database from the official Notion API.
Installing / Getting started
pip install notion-database
import os
import pprint
from notion_database.page import Page
from notion_database.properties import Properties, Children
try:
from dotenv import load_dotenv
load_dotenv()
except ModuleNotFoundError:
pass
NOTION_KEY = os.getenv('NOTION_KEY')
NOTION_DATABASE_ID = os.getenv('NOTION_DATABASE_ID')
PROPERTY = Properties()
PROPERTIES = {
"name": PROPERTY.set_title("title"),
"description": PROPERTY.set_rich_text("description"),
"number": PROPERTY.set_number(1),
"select": PROPERTY.set_select("test1"),
"multi_select": PROPERTY.set_multi_select(["test1", "test2"]),
"checkbox": PROPERTY.set_checkbox(True),
"url": PROPERTY.set_url("www.google.com"),
"email": PROPERTY.set_email("test@test.com"),
"phone": PROPERTY.set_phone_number("010-0000-0000"),
}
PAGE = Page(integrations_token=NOTION_KEY, database_id=NOTION_DATABASE_ID)
PAGE.create_page(properties=PROPERTIES, children=[Children().set_body("hello world!")])
pprint.pprint(PAGE.result)
Building / Developing
python setup.py install
Features
- Create Page object (the database item)
Todo
-
update Page object
-
Retrieve Page object
-
Retrieve database
-
query database
-
list database
Contributing
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
Links
- Repository: https://github.com/your/awesome-project/
- Related projects:
- Notion API : https://developers.notion.com
Licensing
The code in this project is licensed under GPL license.
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-20210513.1.tar.gz.
File metadata
- Download URL: notion-database-20210513.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701339bc76f40a0fab4ce85190ee921622fade48bcb4844c8e1707219f2b438b
|
|
| MD5 |
067e280d0a14d8b3cca24a5394004115
|
|
| BLAKE2b-256 |
88e245449608b7f08bc909e0505f4495dfd93c42e09c8b3d9c5ec32aed863a57
|
File details
Details for the file notion_database-20210513.1-py3-none-any.whl.
File metadata
- Download URL: notion_database-20210513.1-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67044e38e214995eafcb85dba44fb9be1515081b9bc29807cf4bcb1c1b120cbb
|
|
| MD5 |
258c43db47823d1fb23f3de864eadb7c
|
|
| BLAKE2b-256 |
c6dcf2734fa3b2a1f2e922fdaf203c6fdc8dcc344eba91e0f87ec5e17fb5c391
|