Skip to main content

A wrapper of Notion client for Python

Project description

Lotion

Lotion is a wrapper of notion-client.

refs: ramnes/notion-sdk-py: The official Notion API client library, but rewritten in Python! (sync + async)

You can use Notion API easily using Lotion.

Example

By notion-client

from notion_client import Client

client = Client(auth='NOTION_SECRET')
client.pages.create(
    parent={
      'type': 'database_id', 
      'database_id': 'abcd1234-4e63-4a46-9ffe-36adeb59ab30'
    },
    properties={
      'Name': {
        'title': [
          {
            'type': 'text', 
            'text': {
              'content': 'テスト'
            }
          }
        ]
      }
    },
)

By lotion

from lotion import Lotion

lotion = Lotion.get_instance()
created_page = lotion.create_page_in_database(
    database_id='abcd1234-4e63-4a46-9ffe-36adeb59ab30', 
    properties=[
      Title.from_plain_text(name='Name', text='テスト')
    ]
)

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

lotion-0.6.0a2.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lotion-0.6.0a2-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file lotion-0.6.0a2.tar.gz.

File metadata

  • Download URL: lotion-0.6.0a2.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for lotion-0.6.0a2.tar.gz
Algorithm Hash digest
SHA256 bb018cf138f4244d1a5f731a2cbe5035fd071d4fd40d03e222398a15bc346ae4
MD5 319dc527008a21279ade7232de91d095
BLAKE2b-256 ed490a2435ce0a8ac3bce64dc0cdf2636e2010f2b14fb96d0ee565827b8d79f4

See more details on using hashes here.

File details

Details for the file lotion-0.6.0a2-py3-none-any.whl.

File metadata

  • Download URL: lotion-0.6.0a2-py3-none-any.whl
  • Upload date:
  • Size: 55.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for lotion-0.6.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 41e5871274b3d2185f968db36ca5aae770348bbb8d06654deeb229c94d7b3ed1
MD5 f70a9a9fda9757452ed8d0b2397adb14
BLAKE2b-256 f7374acc2971621224d61a67fb32a9591bc47742b5e00ea24a14a601ffd0e7d5

See more details on using hashes here.

Supported by

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