Skip to main content

A package to convert Markdown text to Notion data structure and publish a new page under the parent page

Project description

md2notionpage

A Python package to convert Markdown text into Notion pages. This module provides functionality to create Notion pages from Markdown text, parse Markdown into Notion blocks, and process inline formatting.

Installation

You can install the package using pip:

pip install md2notionpage

Usage

Here's a basic example of how to use the md2notionpage function:

from md2notionpage import md2notionpage
markdown_text = """
# My Page
This is a Notion page created from Markdown.
"""
title = 'My Notion Page'
parent_page_id = 'YOUR_PARENT_PAGE_ID'
notion_page_url = md2notionpage(markdown_text, title, parent_page_id)

Dependencies

  • notion-client

Environment Variables

You must set the NOTION_SECRET environment variable with your Notion API token.

Notes

This package is designed to work with the Notion API and requires proper authentication. Make sure to follow Notion's API documentation to set up your integration.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

md2notionpage-0.1.3.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

md2notionpage-0.1.3-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page