Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

API Client for Notion

Project description

Notion API Client

This is the python client for the Notion API. Use this client to report on ingredients, and create new ingredients.


pip install notion-python


Get your API Token, and ingredient information from here:

import notion

# create a client
client = notion.NotionClient('YOUR_API_KEY')

# make a report, 20, ingredient_id='AN_INGREDIENT_KEY')

# make many reports
client.batch_report('AN_INGREDIENT_KEY', [
    {'date': - timedelta(days=1), 'value': 2},
    {'date':, 'value': 3},

# create a new ingredient
client.create_ingredient('Ingredient Name', [
    {'date': - timedelta(days=1), 'value': 2},
    {'date':, 'value': 3},

Error Handling

All methods will raise a subclass of notion.NotionError in the event that the request could not be made, or an error occurred.



git clone
cd notion-python
pip install -e .


env NOTION_TOKEN=FOOBAR NOTION_API_ROOT= python -m unittest discover
pylint --output-format parseable --disable C0111 notion tests

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for notion-python, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size notion_python-1.0.2-py2.py3-none-any.whl (7.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page