An unofficial OOP interface for the Notion API.
Project description
Welcome to NoPy!
NoPy is an unofficial OOP interface for the Notion API.
Installation
TODO.
Getting Started
Create an instance of a NotionClient
and pass in your integration token. Refer the docs to find out how to set up the integration token and more.
from nopy import NotionClient
client = NotionClient("your-notion-integration-token")
db = client.retrieve_db("your-db-id")
print(db.title) # The database title.
print(db.description) # The database description.
# Getting all the pages in the database.
for page in db.get_pages():
print(page.title) # The page title.
# Closing the client.
client.close()
NOTE: Instead of passing in the integration token, you could instead store the token in the environment variables with the key NOTION_TOKEN
.
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
notion_nopy-0.1.0.tar.gz
(25.3 kB
view hashes)
Built Distribution
Close
Hashes for notion_nopy-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b05adbfe8b0cfcedf0fa1af701d878310540215037f61e3ecfe1ff07d8d71edf |
|
MD5 | 6ad25f5a6e33f2773d184210e80ffa4b |
|
BLAKE2b-256 | 9d94d7a90642f4349ff347635d1990506cda773bc66cc5f62e61dd618d533b54 |