Skip to main content

A Python package for extracting data from Notion using Polars dataframes.

Project description

Notion ETL

A Python package for extracting, transforming, and loading data from Notion using Polars DataFrames and the Notion API Client.

The package provides a simple API for loading raw and clean data from Notion databases into Polars DataFrames, allowing for efficient data manipulation and analysis.

Installation

pip install notion-etl

Usage

Authentication

Set your Notion API key as an environment variable:

export NOTION_TOKEN=secret_...

You can also set the token in your code:

import os
from notion_etl.loader import NotionDataLoader

loader = NotionDataLoader(os.environ["NOTION_TOKEN"])

Loading Data from a Notion Database

from notion_etl.loader import NotionDataLoader

loader = NotionDataLoader()
database = loader.get_database("database_id")
database.records # List of records in the database
database.to_dataframe() # Convert to clean Polars DataFrame
database.to_dataframe(clean=False) # Convert to raw Polars DataFrame

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

notion_etl-0.1.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

notion_etl-0.1.0-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file notion_etl-0.1.0.tar.gz.

File metadata

  • Download URL: notion_etl-0.1.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for notion_etl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d1cb387ca639bde454482d12f29387c73c44d8c4ab61ff5379f6f9926897671
MD5 b8558aeb6ef410e435335ea9fc5e4d4a
BLAKE2b-256 c54073a23698f690476762a7e5905024dbc5900346c0d01bdd9eeb8360d78bf3

See more details on using hashes here.

File details

Details for the file notion_etl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: notion_etl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for notion_etl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3b489137c301ced718abaf53c79a2a4c6d50dca56dac8e5edceb01ddd0b36db
MD5 ef2c3b2c40a07e2e5a18f10109d1b293
BLAKE2b-256 6198bb9775d7bc6345a50898c5689e9d03d745b4d46b8aabddfd26496bb86275

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