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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2notionpage-0.1.0.tar.gz.
File metadata
- Download URL: md2notionpage-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5f50e566494686111ba2a5d2fa0f0e9b0e42bc5361d7472ee2fbf83c8220cdf
|
|
| MD5 |
52d009711b2dc159d68ff81699fb9137
|
|
| BLAKE2b-256 |
56cbd923cdf5ad71860bf4008a1d2b1743ae0e621381812f30dc2246d80f7c14
|
File details
Details for the file md2notionpage-0.1.0-py3-none-any.whl.
File metadata
- Download URL: md2notionpage-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf7ed02270322ac2532cf77d1ae9ab6460b33a57defc4987f6b40c763b57627
|
|
| MD5 |
dcb9cd9071111ffb55798c74c6edb891
|
|
| BLAKE2b-256 |
2e0c6636552713b096a3f6aa4f14d15044939f7b4275cb9e897b3aa1c1c779a8
|