Skip to main content

Sphinx extension to build Notion pages.

Project description

Build Status codecov PyPI

Notion Builder for Sphinx

Extension for Sphinx which enables publishing documentation to Notion.

Installation

sphinx-notionbuilder is compatible with Python 3.11+.

$ pip install sphinx-notionbuilder

Add the following to conf.py to enable the extension:

"""Configuration for Sphinx."""

extensions = ["sphinx_notion"]

Supported markup

The following syntax is supported:

  • Headers

  • Bulleted lists

  • Code blocks

  • Table of contents

  • Block quotes

  • Note, warning, and tip admonitions

See a sample document source and the published Notion page.

Uploading Documentation to Notion

After building your documentation with the Notion builder, you can upload it to Notion using the included command-line tool.

Prerequisites

  1. Create a Notion integration at https://www.notion.so/my-integrations

  2. Get your integration token and set it as an environment variable:

$ export NOTION_TOKEN="your_integration_token_here"

Usage

$ notion-upload -f path/to/output.json -p parent_page_id -t "Page Title"

Arguments:

  • -f, --file: Path to the JSON file generated by the Notion builder

  • -p, --parent_page_id: The ID of the parent page in Notion (must be shared with your integration)

  • -t, --title: Title for the new page in Notion

The command will create a new page if one with the given title doesn’t exist, or update the existing page if one with the given title already exists.

Supported features

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

sphinx_notionbuilder-2025.8.23.1.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

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

sphinx_notionbuilder-2025.8.23.1-py2.py3-none-any.whl (12.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sphinx_notionbuilder-2025.8.23.1.tar.gz.

File metadata

File hashes

Hashes for sphinx_notionbuilder-2025.8.23.1.tar.gz
Algorithm Hash digest
SHA256 80572294721c3db934ada4776d797871eb1ec9a7f0450df425b2602de71a165b
MD5 defed6df7d0832b8619585d797a983b8
BLAKE2b-256 b752b1718523016abee7170917fd480d72b3d80c62728c397522af7ee3607b08

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_notionbuilder-2025.8.23.1.tar.gz:

Publisher: release.yml on adamtheturtle/sphinx-notionbuilder

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

File details

Details for the file sphinx_notionbuilder-2025.8.23.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_notionbuilder-2025.8.23.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 151549eea44db47d362d39fea4248ed58f545785ba50b131f2d890093d9a3512
MD5 33a7062348813b83c1f2ff18f120538c
BLAKE2b-256 825e26d3a44093ae09fd997156b1c989d0987c07748c3290fe09c1b860adb66a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_notionbuilder-2025.8.23.1-py2.py3-none-any.whl:

Publisher: release.yml on adamtheturtle/sphinx-notionbuilder

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