Skip to main content

Notion API implementation for Python

Project description

Notyon

Notion SDK for Python

Notyon Logo

Notyon is an open source Python package that implements the Notion API in Python.

Installation

Run the following command to install: pip install notyon

How to get your Notion auth token

Follow this tutorial: Get your Notion auth token

Basic Example

import notyon as Notion # Import Notyon

# Create an notion client instance
client = Notion.client("auth_token")

# Find a Database
# If found: Returns a Database instance
# If not found: Returns None
found_database = Notion.Database.find(client, "Database name")

# Get database info
db_title = found_database.title
db_id = found_database.id

# Retrieve database content
content = found_database.retrieve()

## Create a database
# If created: Returns a Database instance
# If didn't create: Returns None

# First, get the page_id (parent)[
page_id = "page-id-example"

# Second, create the model
model = Notion.Model("Database title")
model.add([
    #{"field name": "field type"}
    {"name": "text"},
    {"description": "rich_text"}
])

created_database = Notion.Database.create(client, page_id, model)

Roadmap 🗺️

  • 🗃️ Database 1 (v0.1)

    • Retrieve
    • Create
  • 🗃️ Database 2 (v0.2)

    • Update
    • Query
  • 📄 Pages 1 (v0.3)

    • Retrieve
    • Create
    • Delete
  • 📄 Pages 2 (v0.4)

    • Update
    • Query
  • 🔳 Blocks 1 (v0.5)

    • Retrieve
    • Create
  • 🔳 Blocks 2 (v0.6)

    • Update
    • Query
  • 👤 Users (v0.7)

    • Retrieve an user
    • List
  • 🔍️ Search (v0.8)

    • Query pages
  • 🖇️ Retrieve a page property item (0.9)

  • 🔑 Retrieve your token's bot user (1.0)

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

notyon-0.1.7.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

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

notyon-0.1.7-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file notyon-0.1.7.tar.gz.

File metadata

  • Download URL: notyon-0.1.7.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for notyon-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d285d2a2c4bee0e9320c79ac6e80ab4230930a083c93b0da776018000db60c1d
MD5 fd8c702060a38a1894f5ede73b555681
BLAKE2b-256 a71e1e4f273dbe7a4664dfcbf580ee3b1e377973d54b1338f73aeddd84d9affa

See more details on using hashes here.

File details

Details for the file notyon-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: notyon-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for notyon-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 66696d851d7dc86931db4a24c7bfd0a6ff02ecfde4e15d02b8939f4217f1de99
MD5 ee503983cf440d0586d06bc0aa3eda66
BLAKE2b-256 5908562e348c26114c2d7022e8b0c5744bb7fc9fec581afefaeeb1f08b340fbc

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