{"id":13478591,"url":"https://github.com/lazeroffmichael/ticktick-py","last_synced_at":"2025-03-27T07:31:24.273Z","repository":{"id":37541714,"uuid":"319864840","full_name":"lazeroffmichael/ticktick-py","owner":"lazeroffmichael","description":"Unofficial TickTick API","archived":false,"fork":false,"pushed_at":"2024-03-21T06:40:21.000Z","size":4571,"stargazers_count":229,"open_issues_count":33,"forks_count":31,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-03T03:06:11.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lazeroffmichael.github.io/ticktick-py/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lazeroffmichael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-09T06:33:49.000Z","updated_at":"2025-03-02T18:16:51.000Z","dependencies_parsed_at":"2024-10-30T11:42:19.537Z","dependency_job_id":null,"html_url":"https://github.com/lazeroffmichael/ticktick-py","commit_stats":{"total_commits":143,"total_committers":3,"mean_commits":"47.666666666666664","dds":"0.26573426573426573","last_synced_commit":"ef102d9019ef7cce41cc265d78c18071df9033ec"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazeroffmichael%2Fticktick-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazeroffmichael%2Fticktick-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazeroffmichael%2Fticktick-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazeroffmichael%2Fticktick-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazeroffmichael","download_url":"https://codeload.github.com/lazeroffmichael/ticktick-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245802570,"owners_count":20674695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:59.101Z","updated_at":"2025-03-27T07:31:21.596Z","avatar_url":"https://github.com/lazeroffmichael.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![unit-tests](https://github.com/lazeroffmichael/ticktick-py/workflows/unit-tests/badge.svg)\n[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://lazeroffmichael.github.io/ticktick-py/)\n\n# ticktick-py\n## Unofficial TickTick API Client for Python 3\n\n## [Full Documentation](https://lazeroffmichael.github.io/ticktick-py/)\n\n## Description\n`ticktick-py` is an unofficial API library for interacting with [TickTick.com](\u003chttps://www.ticktick.com/\u003e). \nIt allows\nusers a way to interact with their [TickTick](\u003chttps://www.ticktick.com/\u003e) account \nusing [Python](https://www.python.org/). \n\n## Features\n\nThe library automatically fetches all the tasks, tags, lists, and more linked to your profile and stores them in a \ndictionary named [`state`](docs/usage/api.md).\n\n - [Tasks](docs/usage/tasks.md)\n    - Create, Update, and Delete Tasks\n    - Acquire all your uncompleted tasks\n    - Move tasks easily between projects\n    - Acquire all completed tasks in a certain date range\n - [Tags](docs/usage/tags.md)\n    - Batch create, update, and delete tags\n    - Create tags with parameters that are not usually allowed: `\\\\ / \" # : * ? \u003c \u003e | Space`\n - [Projects](docs/usage/projects.md)\n    - Batch create, update, and delete 'lists' (projects)\n    - Batch archive projects\n\n### Example: Creating A Task\n\nLets create a task in our ```inbox``` titled \"Get Groceries\"\n\n``` python\nname = 'Get Groceries'                      # Task Name\nlocal_task = client.task.builder(name)      # Create a dictionary for the task\ngroceries = client.task.create(local_task)  # Actually create the task\n```\n\n### Result\n\nA simplified dictionary for the newly created task is returned.\n\n```python\nprint(groceries)\n\n{'id': '60c6a40b8f083f896c9444a0', 'projectId': 'inbox115781412', 'title': 'Get Groceries', 'timeZone': '', \n 'reminders': [], 'priority': 0, 'status': 0, 'sortOrder': -3298534883328, 'items': []}\n```\nYou can retrieve the full dictionary with every parameter by using the `get_by_id` method. \n\n```python\nfull_task = client.get_by_id(groceries['id'])\nprint(full_task)\n\n{'id': '60c6a40b8f083f896c9444a0', 'projectId': 'inbox115781412', 'sortOrder': -3298534883328, \n 'title': 'Get Groceries', 'timeZone': '', 'isFloating': False, 'reminder': '', 'reminders': [], \n 'priority': 0, 'status': 0, 'items': [], 'modifiedTime': '2021-06-14T00:34:19.907+0000', 'etag': 't8xnwewi', \n 'deleted': 0, 'createdTime': '2021-06-14T00:34:19.907+0000', 'creator': 113581412, 'tags': [], 'kind': 'TEXT'}\n```\n\n**Created Task In `TickTick`**\n\n![image](https://user-images.githubusercontent.com/56806733/121826787-7c5ef980-cc6e-11eb-8483-745df39e973b.png)\n\nMost methods will return the object that was changed. Consult the [usage](docs/usage/api.md) documentation for more information on specific methods.\n\n    \n## Installation\n\nNote: `ticktick-py` requires [Python 3.6](https://www.python.org/downloads/) or above.\n\n```md\npip install ticktick-py\n```\n\n## Get Started \n\n### Register A New TickTick App\n\nThe library now uses TickTick's OpenAPI scheme when possible. This requires registering\na new app through TickTick's developer documentation.\n\n[OpenAPI Documentation](https://developer.ticktick.com/docs#/openapi)\n\nClick on `Manage Apps` in the top right corner. You will be prompted to login with your \nnormal TickTick credentials if you are not already logged in. \n\n![image](https://user-images.githubusercontent.com/56806733/121824548-c4c3ea80-cc61-11eb-8160-698b6ae5c9f6.png)\n\nRegister a new app by clicking the `+App Name` button.\n\n![image](https://user-images.githubusercontent.com/56806733/121824646-87139180-cc62-11eb-9911-fc8bc4d6c3d6.png)\n\n`Name` is the only required parameter here. Once created you should see the app and be able to edit it. \n\n![image](https://user-images.githubusercontent.com/56806733/121825007-e377b080-cc64-11eb-957c-cedf3ef8f7fd.png)\n\nThere should now be a generated `Client ID` and `Client Secret` parameters. It is recommended you save these to your\nenvironment, and make sure you do not share your actual `Client Secret`. \n\n![image](https://user-images.githubusercontent.com/56806733/121825074-584aea80-cc65-11eb-8262-8dde4d9481a1.png)\n\nFor `OAuth Redirect URL` enter any URL you would like to be redirected to upon giving permissions to your account. \nIt does not have to be an actually live URL - this local host URL is fine for most purposes. It is also recommended you \nsave this URL to your environment.\n\n![image](https://user-images.githubusercontent.com/56806733/121825203-e1fab800-cc65-11eb-9a2d-38d0787c5b1b.png)\n\nOnce you have registered the app, you can now proceed with the rest of the setup. \n\n### Required Imports\n\n``` python\nfrom ticktick.oauth2 import OAuth2        # OAuth2 Manager\nfrom ticktick.api import TickTickClient   # Main Interface\n```\n\n### Setup\n\n``` python\nauth_client = OAuth2(client_id=client_id,\n                     client_secret=client_secret,\n                     redirect_uri=uri)\n\nclient = TickTickClient(username, password, auth_client)\n```\n\nThe first time the OAuth2 object runs, you will need to manually accept permissions. A webbrowser will automatically\nopen.\n\n![image](https://user-images.githubusercontent.com/56806733/121825814-479c7380-cc69-11eb-8b0d-a2ff6ef1e8bd.png)\n\nThe default permissions are to Read and Write tasks (and are the only options right now). You can change the permissions\nby specifying the `scope` parameter when creating your OAuth2 instance. More information can be found in the \n[OAuth2 documention](docs/usage/oauth2.md).\n\nIn the console you will be prompted to enter the URL that you were redirected to. It will be your specified OAuth URL \nwith some added parameters.\n\n```\nEnter the URL you were redirected to:\n\u003e? http://127.0.0.1:8080/?code=RK3dSi\u0026state=None\n```\n\nThat is it! Your token information is cached in a file (default is `.token-oauth`) so you will only have to manually \nallow access the first time, and whenever the token expires. As of now it seems tokens expire after about 6 months.\n\n## Future Plans\n\n- **General**\n    - Enhanced Team Support\n- **Tasks**\n    - Get and Restore From Trash  \n- **Projects**\n    - Smart List Support\n    - Column Creation For Kanban View\n- **Pomo and Focus**  \n    - Getting the focus / pomo statistics for your profile  \n    - Starting and stopping the focus / pomo timer    \n- **Habits**  \n    - Get, create, archive, delete, and complete habits","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazeroffmichael%2Fticktick-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazeroffmichael%2Fticktick-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazeroffmichael%2Fticktick-py/lists"}