Skip to main content

Life is divided into before and after meeting Notion

Project description

Notionist

Life is divided into before and after meeting Notion

This is Notion collection extraction repository for people who use Notion.

I saw notion-py, unofficial python API for Notion.so made by jamalex, and appreciated jamalex. Thanks to notion-py, I'm using Notion better. However, there is no table extraction function. I want to use my table contents in python without extracting zip file. Therefore, I made this repository. At first, this repo was for me, but now I want to share this repo for notion users.

Please contact me if you want to join this repo.

Quick Start

You can install this module entering pip install notionist in your command or bash.

pip install notionist

How to Use

1. Get token_v2

First of all, you need token_v2 to use this module. You can find you token_v2 in your cookies after enterting your id and passward to Notion as follows.

F12 (User Defined Key) > Application > Cookies > https://www.notion.so > token_v2

token_v2

2. Make a table in notion

When you make a table in notion, you can copy your table link as follows (If you work in web, you can use url).

TODO: Only particular types such as Number, Text, Multi-select, and Select can be extracted from notion. I will try others as soon as possible.

table

3. Using CollectionExtract

from notionist import collection_api

token_v2 = 'YOUR token_v2'
extraction = collection_api.CollectionExtract(token_v2=token_v2)

url = 'https://www.notion.so/tootouch/ae60f9946dc54de78fbd4850ccf48b40?v=9d07e70306b2498eb82805b83f882140'
extraction.table_extract(url)
Tags number text Name
0 A 1 apple
1 B 2 banana
2 C 3 orange

TODO

  • Extract other types in table
  • Plotting based on table data in Notion page

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

notionist-2.0-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page