Skip to main content

A DLT source for notion

Project description


description: dlt source for notion.com keywords: [notion API, notion.com]

dlt-source-notion

PyPI version

DLT source for 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

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-sources repository 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

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)

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"

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

dlt_source_notion-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

dlt_source_notion-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dlt_source_notion-0.0.1.tar.gz.

File metadata

  • Download URL: dlt_source_notion-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dlt_source_notion-0.0.1.tar.gz
Algorithm Hash digest
SHA256 71de37d001d7260e052af83ee02e019d9c28c9eb8afadb940c89101b0fa6e0d7
MD5 6805ed183efc37bbab228e9ff9312cf3
BLAKE2b-256 73332718832b4d3c18df17fa222834a77f0dc8338f66bae4a8fc38e966e35a32

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_source_notion-0.0.1.tar.gz:

Publisher: test.yml on planet-a-ventures/dlt-source-notion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dlt_source_notion-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dlt_source_notion-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70f9756e385d811605f77685f7740b4002017b2763fa675a4abe5d51e38835de
MD5 eb85efe6d311cd94ed93b13c21e1e50d
BLAKE2b-256 9bc648980a9afa160e4340f7a3ed2deca5ecf276da6a119e7ddbdff0ed296ab2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_source_notion-0.0.1-py3-none-any.whl:

Publisher: test.yml on planet-a-ventures/dlt-source-notion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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