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
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.
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
Release files for notionist 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| notionist-2.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / notionist-2.0-py3-none-any.whl
| Download URL | notionist-2.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25c62a274eb840edb88bab34c07210193f1394fc10a79e33aa179e211d3ad896
|
|
BLAKE2b-256 checksum How to use checksums |
3e99e0c156767e637fae54f0d53da439b224455b34a1ca98042e152b72341e51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|