description: dlt source for notion.com keywords: [notion API, notion.com]
dlt-source-notion
Currently loads the following data:
| Table | Contains |
|---|---|
persons |
Items of the user model of type person |
bots |
Items of the user model of type bot |
database_<name>_<shorthash> (or an explicit table_name, see below) |
The database content (pages) of a given database. Columns are all global page columns + selected columns of properties |
databases |
All metadata of each loaded database. Has the title and a reference to the database table as well. |
databases__properties |
Column <-> Label mapping for each unfiltered database property |
options_<name>_<shorthash> |
All options of a select or multi_select in one of the loaded databases. |
<shorthash> refers to the hashed id of an entity.
The hash is a 4-bit BLAKE2b hash.
Why are you not using the dlt-hub/verified-sources notion source / Differences
The official verified source has a few drawbacks:
- on usage of the verified source, a copy of the current state of
the
dlt-hub/verified-sourcesrepository is copied into your project; Once you make changes to it, it effectively becomes a fork, making it hard to update after the fact. - This makes use of a preexisting client implementation
- And Pydantic types for Notion entities, which makes this implementation a lot more stable
Usage
Create a .dlt/secrets.toml with your API key and email:
notion_token = "ntn_abcd12345"
and then run the default source with optional list references:
from dlt_source_notion import source as notion_source
pipeline = dlt.pipeline(
pipeline_name="notion_pipeline",
destination="duckdb",
dev_mode=True,
)
notion_data = notion_source()
pipeline.run(notion_data)
To load a specific database under a clean, explicit table name instead of the
default database_<title>_<shorthash>, pass table_name to DatabaseResource:
from dlt_source_notion import source as notion_source, DatabaseResource
events_db = DatabaseResource(
database_id="1b83e0058e9244e7b1933cce404e2a98",
table_name="event_database",
)
notion_data = notion_source(database_resources=[events_db])
Development
This project is using devenv.
Commands:
| Command | What does it do? |
|---|---|
format |
Formats & lints all code |
sample-pipeline-run |
Runs the sample pipeline. By default dev_mode=True which fetches resources with a limit of 1 (page) |
sample-pipeline-show |
Starts the streamlit-based dlt hub |
Run the sample
NOTION_TOKEN=[...] \
sample-pipeline-run
alternatively you can also create a .dlt/secrets.toml
(excluded from git) with the following content:
notion_token = "ntn_abcd12345"
Metadata
Release files for dlt-source-notion 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dlt_source_notion-0.0.13.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dlt_source_notion-0.0.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / dlt_source_notion-0.0.13.tar.gz
| Download URL | dlt_source_notion-0.0.13.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
665acb0eab6e8b102f8fd48381d4f895df30bf65471e72d776b6bdf07a2edde4
|
|
BLAKE2b-256 checksum How to use checksums |
90adc54170709fbf60a43e55c6b49dc3c17a51c818853c7fa5dd41dc631c7844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / dlt_source_notion-0.0.13-py3-none-any.whl
| Download URL | dlt_source_notion-0.0.13-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abba70fcf76c43eedf4b431fa5977e3f4cf7e4833c19ad70a82cfb1a2bd2cf78
|
|
BLAKE2b-256 checksum How to use checksums |
beab3e230c92fbbc3c6c40bd19f5eaa89deff52d349316827f7953a74c20f27c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency log