Python SDK for Notion API client
Project description
Python Notion
A simple wrapper for Notion SDK written in Python
Installation
This library only supported Python version 3.7 and above, earlier version might be work, but it still has backward compatibility for current APIs
pip install notion-wrapper
Usage
Before to do that, ensure you've setup Notion Integration and obtain the Integration Token. You can see about the Integration in here.
For quick example to get all users :
from notion.clients import NotionAPI
version = "2021-05-13" # notion version is required
secret = "YOUR_NOTION_TOKEN"
client = NotionAPI(secret, version)
print(client.get_all_users())
That following result something like :
{'object': 'list', 'results': [{'object': 'user', 'id': 'd4da784c-1c77-47e8-96bd-e917d96cd8b8', 'name': 'Ryan Febriansyah', 'avatar_url': 'https://lh4.googleusercontent.com/-O3Rzxu0oM9k/AAAAAAAAAAI/AAAAAAAAAAA/AMZuucnDB5M-7zjHQcTqlJ0JBiAtlA5-RQ/photo.jpg', 'type': 'person', 'person': {'email': 'ryanfebriansyah72@gmail.com'}}, {'object': 'user', 'id': 'f4eb6dff-b0a9-431e-993f-970f049f1c76', 'name': 'python-sdk', 'avatar_url': None, 'type': 'bot', 'bot': {}}], 'next_cursor': None, 'has_more': False}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pynotion-wrapper-0.1.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for pynotion_wrapper-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28d5304d9995b20b9500a42731f3a0ecc933c2e30d5d79e2e98bf3120df14d7a |
|
MD5 | 03a727f91c71da41bb5e585a8f5a0236 |
|
BLAKE2b-256 | 55275090c04fc8c9727ca5587941b6d29071aeedc596c39aff0c72534f543353 |