Skip to main content

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


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)

Uploaded Source

Built Distribution

notion_nopy-0.1.0-py3-none-any.whl (32.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page