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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file notion_nopy-0.1.0.tar.gz.

File metadata

  • Download URL: notion_nopy-0.1.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/4.4.0-19041-Microsoft

File hashes

Hashes for notion_nopy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de840b5035435985a50e6035621679d50b9ca6b6338c6becf5433befd6f66a33
MD5 1702eb5e8e6c188d89ad5f8e4becbc7e
BLAKE2b-256 78cce8a98684bcbf22c1de109a5a6cb99c7c5d9da3f9850febd2470cf09afbd0

See more details on using hashes here.

File details

Details for the file notion_nopy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: notion_nopy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/4.4.0-19041-Microsoft

File hashes

Hashes for notion_nopy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b05adbfe8b0cfcedf0fa1af701d878310540215037f61e3ecfe1ff07d8d71edf
MD5 6ad25f5a6e33f2773d184210e80ffa4b
BLAKE2b-256 9d94d7a90642f4349ff347635d1990506cda773bc66cc5f62e61dd618d533b54

See more details on using hashes here.

Supported by

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