This is a python project to fetch a given word parts of speech, definitions, examples and synonyms using Google Dictionary, and automatically add it to a Notion database.
Notion limits the number of requests to 3 per second (see Notion website for more information). Limits for property value sent to the Notion API (see Notion website for more information):
| Property value type | Inner property | Size limit |
|---|---|---|
| Rich text object | text.content |
2000 characters |
| Rich text object | text.link.url |
1000 characters |
| Rich text object | equation.expression |
1000 characters |
| Any array of rich text objects | 100 elements | |
| Any URL | 1000 characters | |
| Any email | 200 characters | |
| Any phone number | 200 characters | |
| Any multi-select | 100 options | |
| Any relation | 100 related pages | |
| Any people | 100 users |
To run this project, you will need to add the following environment variables to your .env file
DATABASE_ID
See Notion website for more information.
- Get the URL of your database of choice
- Copy your database ID, which you can see in
https://www.notion.so/{workspace_name}/{database_id}?v={view_id}
TOKEN
See Notion website for more information.
- Create a Notion integration
- Share your integration to your database of choice
- Copy your "Internal Integration Token"
Clone the project
git clone https://github.com/MatthieuMezirard/notion-word-data.gitGo to the project directory
cd notion-word-dataInstall dependencies
poetry installEnter the words and their languages
code WORDS.mdRun the main file
python .\notion-word-data\app.pyTo run tests, run the following command
poetry run pytest