• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Python
  • License
    GNU Lesser Genera...
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python bindings for Notion Database API

Test Python Package

Python Notion Database

Database of Pythonic Notion API

notion-database.gif

created by database from the official Notion API.

"notion database" is Notion API wrapper library.

import os

from notion_database.page import Page
from notion_database.properties import Properties
from notion_database.const.query import Direction, Timestamp
from notion_database.search import Search

S = Search(integrations_token=os.getenv('NOTION_KEY'))
S.search_database(query="", sort={"direction": Direction.ascending, "timestamp": Timestamp.last_edited_time})
for i in S.result:
  PROPERTY = Properties()
  PROPERTY.set_title("title", "title")
  PROPERTY.set_rich_text("Description", "description text")
  P = Page(integrations_token=os.getenv('NOTION_KEY'))
  P.create_page(database_id=i["id"], properties=PROPERTY)

See detailed example here.

License Notice

hope that many people will use this package, also license has been changed to LGPL 3 from 1.0.

previous version is GPL, please be careful when using this out of version.

What's new notion-version

  • 1.0.0

    • Now that we've implemented all features,
    • change the version rule to the semantic version.
    • notion-version : "2022-06-28"
  • 2022.08.01

    • Update notion-version (2022-06-28)
  • 2022.03.27

  • 2021.09.01

    • Update notion-version (2021-08-16)

Installing / Getting started

pip install notion-database

Docs

https://notion-database.readthedocs.io

Building / Developing

python setup.py install

Features

  • Blocks
    • βœ… Append block children
    • βœ… Retrieve block children
  • Pages
    • βœ… Create a page
    • βœ… Retrieve a page
    • βœ… Retrieve a page property item
    • βœ… Update page properties
    • βœ… Archive a page
  • Databases
    • βœ… Create a database
    • βœ… Query a database
      • See detailed example here.
    • βœ… Retrieve a database
    • βœ… Update a database
    • βœ… Update database properties
  • Blocks
    • βœ… Retrieve a block
    • βœ… Retrieve block children

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Links

Licensing

The code in this project is licensed under LGPL license.

Example project using this package

More Repositories

1

typescript-express-ejs-node-starter

TypeScript Express ejs template starter using Microsoft's TypeScript-Node-Starter
HTML
14
star
2

ubuntu-korea-l10n-workshop

ubuntu korea community l10n workshop repo
7
star
3

learning-code

learned and practiced programming code (C++, Django, electron, Latex and ect...)
Go
6
star
4

phpbb-korean

PHPBB 3.2.x Korean Language Packs
PHP
6
star
5

jira-2-notion-db

Jira to Notion-database Migration Tool
Python
5
star
6

ubuntu-korea-cpp-study-book

Ubuntu Korean Community C++ Basic Study Textbook
C++
4
star
7

q2a-korean-translation

Question2Answer 1.7.X~1.8.X korean translation complete package
PHP
4
star
8

kookmin-cpp-battleship-project

2018 kookmin.univ cs c++ programming battleship game project assignment
C++
3
star
9

web-client-term-project

web-client-computing term-project
HTML
2
star
10

electron-quick-start-with-flask

This project is a basic template to get started quickly with Electron + Flask.
JavaScript
2
star
11

hangul-database

Hangul (korean) vowel, consonant, etc... basic grammar mysql database (DB) project
1
star
12

kookmin-university-home

Kookmin University home extension repository
HTML
1
star
13

python-docker-environment

Docker image of my Python development environment (python, Jupyterlab...)
Dockerfile
1
star
14

niadic_py

Unofficial Python Wrapper for NIADic dataset
Python
1
star
15

win10block

Removing Windows 10 Updater for Windows 7 and Windows 8
Batchfile
1
star
16

buzzwork

buzz(ing) + (remote) work
Python
1
star
17

ubuntu-ko-irc-in-python

It is a app to watch the ubuntu-ko(on irclogs.ubuntu.com) irc channel.
Python
1
star
18

ubuntu-code-of-conduct-kr

ubuntu code of conduct korean
1
star
19

easy-adb

Easy to use ADB commands in Python 3
Python
1
star
20

flask-variable-manager

Create a variable manager in flask, enter values in python, and use values on the web.
Python
1
star