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.0a1.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.0a1-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lotion-0.6.0a1.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.0a1.tar.gz
Algorithm Hash digest
SHA256 e7c00d9f866812dcede210a33acb201e1064c232c7b3c86135ed26f4ed802e69
MD5 c1d9ab43de53432179a990548882a378
BLAKE2b-256 3a90ebea0fbe111c32bbb7be6a51435224c6ba12d5fdd1954c0f2fad9a4f8a76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lotion-0.6.0a1-py3-none-any.whl
  • Upload date:
  • Size: 54.8 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.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bef4bd5940f2608ee5fb7aab5e62fa8fac01614085bf89906c7925a33d81f75
MD5 2992bded63dd1f23f8abd787b6a4e421
BLAKE2b-256 a3c9bf822c3610ef56a1bc41db7591d4ce0a87127a36878076f26859d7bcca41

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