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.3.0.tar.gz (54.5 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.3.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file lotion-0.3.0.tar.gz.

File metadata

  • Download URL: lotion-0.3.0.tar.gz
  • Upload date:
  • Size: 54.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for lotion-0.3.0.tar.gz
Algorithm Hash digest
SHA256 251ba5b323d993529cec0edc8717ec930627a61e7179df9cf5a333cd2d649685
MD5 8f953af39e60ad84ad26780999cc4f41
BLAKE2b-256 9bb90eca0df2e15b11ee0db4775d4deb2e1bab7ae6b36662a03b45c8c97a9437

See more details on using hashes here.

File details

Details for the file lotion-0.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for lotion-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9118bdb241b4d28c4c3772f8e540d2467dbdcb33ef673edf7e12be844fc84a64
MD5 e6abe8e4d5acb37e0653d9d9c8f7b5b3
BLAKE2b-256 1b6c48fc792c377b998a40539b712ae7837b641f2ec940f9dd0f83036c32f83e

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