Yet another unofficial Notion API client.
Project description
Nothion
Yet another unofficial Notion API client.
Installation
pip install nothion
Usage
from nothion import NotionClient
client = NotionClient(auth_secret="your_auth_token",
tasks_db_id: str | None = None,
stats_db_id: str | None = None,
notes_db_id: str | None = None,
expenses_db_id: str | None = None)
client.tasks.get_active_tasks()
Features
Tasks Handler
- get_active_tasks()
- get_notion_task(ticktick_task: Task)
- get_notion_id(ticktick_task: Task)
- is_already_created(task: Task)
- create(task: Task)
- update(task: Task)
- complete(task: Task)
- delete(task: Task)
Notes Handler
- is_page_already_created(title: str, page_type: str)
- create_page(title: str, page_type: str, page_subtype: tuple[str], date: datetime, content: str)
Stats Handler
- get_incomplete_dates(limit_date: datetime) -> List[str]
- update(stat_data: PersonalStats, overwrite_stats: bool = False)
- get_between_dates(start_date: datetime, end_date: datetime) -> List[PersonalStats]
Expenses Handler
- add_expense_log(expense_log: ExpenseLog)
Data Models
PersonalStats
This package uses a custom attrs model to store personal stats:
- date: str
- time_stats: TimeStats
- weight: float
TimeStats
- work_time: float
- leisure_time: float
- focus_time: float
ExpenseLog
This package uses a custom attrs model to store expense log data:
- fecha: str
- egresos: float
- producto: str
Environment Variables
- NT_AUTH: Notion auth token, for example secret_t1CdN9S8yicG5eWLUOfhcWaOscVnFXns.
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
nothion-0.4.4.tar.gz
(13.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nothion-0.4.4-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file nothion-0.4.4.tar.gz.
File metadata
- Download URL: nothion-0.4.4.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617f49635f3b41076f596d0b133e03bcf7695075a0dd39832ecf64f62288794f
|
|
| MD5 |
a9df1ddb7669ae7986930c82a84328d3
|
|
| BLAKE2b-256 |
f56f6de5b785000aa3675a7e49d361fcc69c4db5113b96ba88b9b87fb9ec0133
|
File details
Details for the file nothion-0.4.4-py3-none-any.whl.
File metadata
- Download URL: nothion-0.4.4-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08725a3757c3fe190d2846a03aaab37b2bfa17d34245b2bfde6e3d8d77af9ab1
|
|
| MD5 |
75dc41d02bac94c358744615dd53888f
|
|
| BLAKE2b-256 |
7a7df3130723583407d4ea830c13864c4a7657f3e9df83be356e859166a70916
|