sphinx-notionbuilder


Namesphinx-notionbuilder JSON
Version 2025.8.24.1 PyPI version JSON
download
home_pageNone
SummarySphinx extension to build Notion pages.
upload_time2025-08-24 12:25:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2025 Adam Dangoor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords notion sphinx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |Build Status| |codecov| |PyPI|

Notion Builder for Sphinx
=========================

Extension for Sphinx which enables publishing documentation to Notion.

.. contents::

Installation
------------

``sphinx-notionbuilder`` is compatible with Python |minimum-python-version|\+.

.. code-block:: console

   $ pip install sphinx-notionbuilder

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

.. code-block:: python

   """Configuration for Sphinx."""

   extensions = ["sphinx_notion"]

For collapsible sections (toggle blocks), also add the sphinx-toolbox collapse extension:

.. code-block:: python

   """Configuration for Sphinx."""

   extensions = [
       "sphinx_notion",
       "sphinx_toolbox.collapse",
   ]

Supported markup
----------------

The following syntax is supported:

- Headers
- Bulleted lists
- Code blocks
- Table of contents
- Block quotes
- Note, warning, and tip admonitions
- Collapsible sections (using sphinx-toolbox collapse directive)

See a `sample document source <https://raw.githubusercontent.com/adamtheturtle/sphinx-notionbuilder/refs/heads/main/sample/index.rst>`_ and the `published Notion page <https://www.notion.so/Sphinx-Notionbuilder-Sample-2579ce7b60a48142a556d816c657eb55>`_.

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:

.. code-block:: console

   $ export NOTION_TOKEN="your_integration_token_here"

Usage
~~~~~

.. code-block:: console

   $ 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
------------------

.. |Build Status| image:: https://github.com/adamtheturtle/sphinx-notionbuilder/actions/workflows/ci.yml/badge.svg?branch=main
   :target: https://github.com/adamtheturtle/sphinx-notionbuilder/actions
.. |codecov| image:: https://codecov.io/gh/adamtheturtle/sphinx-notionbuilder/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/adamtheturtle/sphinx-notionbuilder
.. |PyPI| image:: https://badge.fury.io/py/Sphinx-Notion-Builder.svg
   :target: https://badge.fury.io/py/Sphinx-Notion-Builder
.. |minimum-python-version| replace:: 3.11

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sphinx-notionbuilder",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "notion, sphinx",
    "author": null,
    "author_email": "Adam Dangoor <adamdangoor@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bd/95/57ec10b3b5b1e80b541463721bb5a8c84e0374785f082e77e7b22cac3146/sphinx_notionbuilder-2025.8.24.1.tar.gz",
    "platform": null,
    "description": "|Build Status| |codecov| |PyPI|\n\nNotion Builder for Sphinx\n=========================\n\nExtension for Sphinx which enables publishing documentation to Notion.\n\n.. contents::\n\nInstallation\n------------\n\n``sphinx-notionbuilder`` is compatible with Python |minimum-python-version|\\+.\n\n.. code-block:: console\n\n   $ pip install sphinx-notionbuilder\n\nAdd the following to ``conf.py`` to enable the extension:\n\n.. code-block:: python\n\n   \"\"\"Configuration for Sphinx.\"\"\"\n\n   extensions = [\"sphinx_notion\"]\n\nFor collapsible sections (toggle blocks), also add the sphinx-toolbox collapse extension:\n\n.. code-block:: python\n\n   \"\"\"Configuration for Sphinx.\"\"\"\n\n   extensions = [\n       \"sphinx_notion\",\n       \"sphinx_toolbox.collapse\",\n   ]\n\nSupported markup\n----------------\n\nThe following syntax is supported:\n\n- Headers\n- Bulleted lists\n- Code blocks\n- Table of contents\n- Block quotes\n- Note, warning, and tip admonitions\n- Collapsible sections (using sphinx-toolbox collapse directive)\n\nSee a `sample document source <https://raw.githubusercontent.com/adamtheturtle/sphinx-notionbuilder/refs/heads/main/sample/index.rst>`_ and the `published Notion page <https://www.notion.so/Sphinx-Notionbuilder-Sample-2579ce7b60a48142a556d816c657eb55>`_.\n\nUploading Documentation to Notion\n----------------------------------\n\nAfter building your documentation with the Notion builder, you can upload it to Notion using the included command-line tool.\n\nPrerequisites\n~~~~~~~~~~~~~\n\n1. Create a Notion integration at https://www.notion.so/my-integrations\n2. Get your integration token and set it as an environment variable:\n\n.. code-block:: console\n\n   $ export NOTION_TOKEN=\"your_integration_token_here\"\n\nUsage\n~~~~~\n\n.. code-block:: console\n\n   $ notion-upload -f path/to/output.json -p parent_page_id -t \"Page Title\"\n\nArguments:\n\n- ``-f, --file``: Path to the JSON file generated by the Notion builder\n- ``-p, --parent_page_id``: The ID of the parent page in Notion (must be shared with your integration)\n- ``-t, --title``: Title for the new page in Notion\n\nThe 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.\n\nSupported features\n------------------\n\n.. |Build Status| image:: https://github.com/adamtheturtle/sphinx-notionbuilder/actions/workflows/ci.yml/badge.svg?branch=main\n   :target: https://github.com/adamtheturtle/sphinx-notionbuilder/actions\n.. |codecov| image:: https://codecov.io/gh/adamtheturtle/sphinx-notionbuilder/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/adamtheturtle/sphinx-notionbuilder\n.. |PyPI| image:: https://badge.fury.io/py/Sphinx-Notion-Builder.svg\n   :target: https://badge.fury.io/py/Sphinx-Notion-Builder\n.. |minimum-python-version| replace:: 3.11\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Adam Dangoor\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Sphinx extension to build Notion pages.",
    "version": "2025.8.24.1",
    "project_urls": {
        "Source": "https://github.com/adamtheturtle/sphinx-notionbuilder"
    },
    "split_keywords": [
        "notion",
        " sphinx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7d75566a25c37bc1ed9458e1114b02e57f52d49fdeebfe13e1f199a2c3e1355c",
                "md5": "90424d91ebee765b368c89406006d1fc",
                "sha256": "b55b89f0d03825ffe35df55997badedf43ba96a334243509313b1f0b462e3a0a"
            },
            "downloads": -1,
            "filename": "sphinx_notionbuilder-2025.8.24.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90424d91ebee765b368c89406006d1fc",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.11",
            "size": 15425,
            "upload_time": "2025-08-24T12:25:00",
            "upload_time_iso_8601": "2025-08-24T12:25:00.068421Z",
            "url": "https://files.pythonhosted.org/packages/7d/75/566a25c37bc1ed9458e1114b02e57f52d49fdeebfe13e1f199a2c3e1355c/sphinx_notionbuilder-2025.8.24.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bd9557ec10b3b5b1e80b541463721bb5a8c84e0374785f082e77e7b22cac3146",
                "md5": "1d4b051120a31d5418080edae94a717d",
                "sha256": "c496fb32f3145ff76ce148df6f1d9ad4bc3b0f1500172638f082ed114446944e"
            },
            "downloads": -1,
            "filename": "sphinx_notionbuilder-2025.8.24.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1d4b051120a31d5418080edae94a717d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 32996,
            "upload_time": "2025-08-24T12:25:01",
            "upload_time_iso_8601": "2025-08-24T12:25:01.632789Z",
            "url": "https://files.pythonhosted.org/packages/bd/95/57ec10b3b5b1e80b541463721bb5a8c84e0374785f082e77e7b22cac3146/sphinx_notionbuilder-2025.8.24.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-24 12:25:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamtheturtle",
    "github_project": "sphinx-notionbuilder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sphinx-notionbuilder"
}
        
Elapsed time: 1.85834s