Skip to main content

Helper to build Notion API params, parse markdown text into Notion API blocks

Project description

notion-params

Helper to build Notion API params, parse markdown text into Notion API blocks

import notion_client
from notion_params import NotionParams as NP


def demo():
    notion = notion_client.client.Client(auth=os.environ['NOTION_TOKEN'])
    page_id = '7458781ba20644e0b850452095000000'
    sub_page = notion.pages.create(**NP.create_page(
        page_id,
        title='title text',
        emoji='😀',
        text="""# H1 title
Text text text

> quote
>
>> sub quote
>> more text

!!callout
custom markdown syntax to write callout

- list item abc
- another list item

1. ordered list sample
1. second item

...
"""))

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

notion-params-0.0.1.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

notion_params-0.0.1-py3-none-any.whl (8.9 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