📦 TickTick-Unofficial-Api
TickTick-Unofficial-Api is a Python wrapper for the unofficial TickTick API (v2). It provides access to task, focus, and habit data, and currently supports reading and writing habit entries. Authentication is handled via cookies retrieved either through Selenium or manually extracted browser sessions.
✨ Features
- Retrieve and add TickTick habit entries
- Retrieve TickTick focus time data
- Retrieve TickTick tasks (also supported by the official v1 API)
Planned features:
- Add support for writing focus sessions
- Add support for creating and updating tasks
🗂️ Project Structure
src/
└── ticktick_v2/
├── utils/ utility functions
├── web/ web-related functionality (e.g., Selenium login)
├── cookies_login.py handles cookie retrieval via Selenium
├── focus.py focus session access
├── habits.py habit access and writing
└── tasks.py task access
📥 Installation
To use the package, add authentication and install via:
pip install ticktick-py-v2
🚀 Usage
You can use the module by importing ticktick_v2:
from ticktick_v2.habits import TicktickHabitHandler, TickTickHabitEntry
from ticktick_v2.focus import TicktickFocusHandler, TickTickFocusTime
from ticktick_v2.tasks import TicktickTaskHandler, TickTickTask
All return values use pydantic BaseModel for data validation.
To use data as dict, simply convert via .dict()
🔐 Authentication
To access your TickTick data, you must authenticate using one of two methods:
Method 1: Environment Variables + Selenium
Set the following environment variables:
TICKTICK_USERNAME="your_email@example.com"
TICKTICK_PASSWORD="your_password"
The package will use a headless Selenium session to retrieve the necessary cookies for API access.
Method 2: Pre-saved Cookies
Create a file named .ticktick-cookies in your working directory.
This file should contain cookies exported from a logged-in TickTick browser session (e.g., using browser developer tools).
🤝 Contributing
Contributions are welcome. Please open issues or pull requests for new features, improvements, or bug fixes.
🪪 License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Metadata
Release files for ticktick-py-v2 0.24.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ticktick_py_v2-0.24.1.tar.gz | 15.6 kB | Without provenance | Details for ticktick_py_v2-0.24.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ticktick_py_v2-0.24.1-py3-none-any.whl | Python 3 | none | any | Details for ticktick_py_v2-0.24.1-py3-none-any.whl |
Total release size: 34.6 kB
Release files / ticktick_py_v2-0.24.1.tar.gz
| Download URL | ticktick_py_v2-0.24.1.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2f394001e144a1e0f43605133d7de8d153767f31d504c117bdbdc0ef3c1b31e
|
|
BLAKE2b-256 checksum How to use checksums |
868f7ff4ae6fa247ee60697d74cd212c4ab0d064847dd56eaa1800493cce2c8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.2 Windows/11
|
Release files / ticktick_py_v2-0.24.1-py3-none-any.whl
| Download URL | ticktick_py_v2-0.24.1-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a92bdf640f4d068842111ce5e5766e230409a467e441c7e51a90e4ce2f2fb4d
|
|
BLAKE2b-256 checksum How to use checksums |
8bc783d519409516125acda93726fcc598cc7b107250b3ae7117b716828d28a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.2 Windows/11
|
Security for ticktick-py-v2 0.24.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.