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
Built Distribution
Hashes for md2notionpage-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a128bd6bfa783bb77700bbdd18508c79cc7d27ed7ca1f101420fb9b321331d87 |
|
MD5 | ec770eb04f212dd550b260ed9f815a5e |
|
BLAKE2b-256 | 0f60de5cd5dc499304aea6579bcadabf450a108532d7dbd800ca3c600433c58d |