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.2.0.tar.gz (52.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.2.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lotion-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e38ce95bb0ea460290268241c3e7b566c874a38f09c12e2b3c905341827151f
MD5 7a9ab609e85cad2ed1c1907a108a34c8
BLAKE2b-256 846a694436269859a04aac737916944c163d2ae4415ba5060fb8625513891654

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lotion-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 56.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffa148f6cd5ac8cf1eb6a36dde0b860981e5ad1835b69910219731ed0b584676
MD5 8d9db60716546c39d06f3facf207291a
BLAKE2b-256 336026ffa3e8b2bb4f0114151c2414064c5dc0c36292f6b4f3f86ccd1fcf4056

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