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='テスト')
    ]
)

Use Original Prop and Database page.

Available Class

  • Checkbox
  • Date
  • Email
  • MultiSelect
  • Number
  • PhoneNumber
  • Relation
  • Select
  • Status
  • Text
  • Title
  • Url

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.8.7.tar.gz (35.3 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.8.7-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lotion-0.8.7.tar.gz
Algorithm Hash digest
SHA256 657a131c25f36400b89f6f045e6ed84807612911eec2aa4b1fda53a3ff73049c
MD5 8741d669f9a97e7549981863663db088
BLAKE2b-256 468a3f19fe1820035495a6ab6732e0fbc620f1d389e7ba3351e33d3557e2eda7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lotion-0.8.7-py3-none-any.whl
  • Upload date:
  • Size: 59.6 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.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 04b0fe44f89dd8b690475d2036a7c197949fb2b5f79807952803a7839e6184cc
MD5 700154d97a80237b9659ed3ca2dd1c58
BLAKE2b-256 1f14e945ffae1135e9275b7bb0dd568c2a3220ac30bfa5dfc9392904d3d37c39

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