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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notionapimanager-0.1.6.tar.gz.
File metadata
- Download URL: notionapimanager-0.1.6.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.10 Darwin/21.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d28d30ef454fa4b254a0787aaa60cbe60e79f57f6d2764cc57af659398a860d4
|
|
| MD5 |
088486b566ba26b1a1ac42b1a3fb4ec6
|
|
| BLAKE2b-256 |
6183dd3467e900977cd1247db30a67d05b0e03b6238eeda209741f37eb7fe82a
|
File details
Details for the file notionapimanager-0.1.6-py3-none-any.whl.
File metadata
- Download URL: notionapimanager-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49e7be6a1f6e1aee4aeaec24f979ace4527bcee4bc03f0192436050b48d8937f
|
|
| MD5 |
d087726e39aa03da7af0d40da4e08871
|
|
| BLAKE2b-256 |
0685fe1a474ecfe07b886f4297e21f08ae6f2c646095f2bc82d994dd419c0e67
|