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.9.2.tar.gz (36.1 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.9.2-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lotion-0.9.2.tar.gz
Algorithm Hash digest
SHA256 ca2f22c2ccbc9264fcd83eeb415d7551bdb7af4810f15900394c95e607300215
MD5 7c6985db11517c766a2af0a7e7297a53
BLAKE2b-256 034c9c3222d45395fbadfe69709cf552fe0826a107addaff2279cb5a72a3f4cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lotion-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 61.0 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.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13e6fba2554e4e33e143e76c8b5e244183c7e9972ba04f59cd6cf7d077a8c70a
MD5 53cf14b0ee730e8a8dae261f71294d49
BLAKE2b-256 b20187587a7e85e40041b79ef803fab834be2e4e66e3e0bf68e98b691e32b9ab

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