Skip to main content

Python package for consulting, creating and editing Notion databases

Project description

Notion API Manager

This package implements a wrapper class around the official Notion API.

It makes it easier to read databases as Pandas DataFrames and to create new registries.

GitHub repository.

Steps

Obtain a Notion integration token

You can do it following the instructions in this PrettyStatic blog article.

Install package

pip install notionapimanager

Basic usage of the NotionDatabaseApiManager class

Note: in Notion, a database is what in SQL we would call a table. Hence, a Notion database will be returned as a Pandas DataFrame instance.

from notionapimanager.notion_database_api_manager import NotionDatabaseApiManager
from notionapimanager.notion_property_encoder import PropertyValue

integration_token = "secret_example_integration_token_3147cefa7cd20d4s45677dfasd34"
database_id_1 = "cc147cefa7cd20d4841469ddbd4cd893"
database_id_2 = "cc147cef20d456461469ddbd4das4593"

manager = NotionDatabaseApiManager("secret_SHWYRGpAOK6471doOQ9gPbmEAzzfsdfpznGlPzCFwCW", [database_id_1, database_id_2])
manager.connect()

# Get database 1
manager.get_database(database_id_1)

# Insert a new entry on the database 2
manager.create_page(
    database_id_2,
    [
        PropertyValue("Property Name", "Property value"),
    ]
)

How differnt Notion property types match with Pandas DataFrame column types

To be completed

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

notionapimanager-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

notionapimanager-0.1.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file notionapimanager-0.1.2.tar.gz.

File metadata

  • Download URL: notionapimanager-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Darwin/21.1.0

File hashes

Hashes for notionapimanager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0ae0a5858793f60bca5527a843b868130e3ef314f1dc9a5d8dbb354f151b54e3
MD5 de0923d7e0006a26870b13ed971029e0
BLAKE2b-256 1dbec6f60276688c9d79ba6de8ac703e2a584ebe69b2e53652ea4ecbcaf464a9

See more details on using hashes here.

File details

Details for the file notionapimanager-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: notionapimanager-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Darwin/21.1.0

File hashes

Hashes for notionapimanager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61b6cb61b0a99be6e587b9670c6041874765746ecb7c7e252394a25c169dcab9
MD5 ba6793ceb8384f64a3559a1f27842249
BLAKE2b-256 50fa322e6f3f6dc2e315a2d9e5c72d499e5220c0566ea347e438af8c0eaac709

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