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.

Documentation.

PyPI.

Steps

Obtain a Notion integration token

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

Install package

Install package from PyPI.

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(integration_token, [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"),
    ]
)

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.10.tar.gz (4.9 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.10-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: notionapimanager-0.1.10.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Linux/5.4.109+

File hashes

Hashes for notionapimanager-0.1.10.tar.gz
Algorithm Hash digest
SHA256 3c9b5aed63b33e0271b542d486937a18f04e06f4a0246a0fd56090ca97b11f24
MD5 7d907e1c01aaf84f8d5da20f138fc98c
BLAKE2b-256 4931fee86dd9ad5f193cf9873a2cba5a56aa6679d7129f8a964c094ea6a69406

See more details on using hashes here.

File details

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

File metadata

  • Download URL: notionapimanager-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Linux/5.4.109+

File hashes

Hashes for notionapimanager-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 3bef58bc39fed0aee93df5ba594e465983340d3dfc8876eedf3899a143e61b13
MD5 b17e95151e436cd372edf0c31e487a56
BLAKE2b-256 789934457a262c4fb3a4a983a2af2dd86babef28939950974dc2a3c4cf16a46e

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