Clixify: Python Client for ClickUp API v2
Project description
Clixify: Python Client for ClickUp API v2
A Python library providing an object-oriented interface to interact with the ClickUp API v2. This library aims to simplify common operations like managing workspaces, spaces, folders, lists, and tasks.
Features
- Object-Oriented: Interact with ClickUp resources (Workspaces, Spaces, Folders, Lists, Tasks) as Python objects.
- Hierarchy Management: Easily navigate and manage the ClickUp hierarchy (Workspace -> Space -> Folder -> List -> Task).
- Core CRUD Operations: Create, Read (Get), Update, Delete operations for major resources where applicable via the API.
- Task Management:
- Create tasks within lists.
- List tasks with filtering and automatic pagination support (
get_all=True). - Update task details (name, description, status, priority, dates, etc.).
- Assign/Unassign users by ID or Name (with ambiguity handling).
- Add/Get task comments.
- Add/Remove task tags (by name).
- Add/Remove task watchers (by ID or Name).
- Create subtasks.
- Add/Remove task dependencies.
- User Resolution: Find users within a List context by name or email fragment for assignments/watchers, raising specific exceptions (
UserNotFoundByNameError,AmbiguousUserNameError) on failure. - Rate Limiting: Includes a built-in delay (
time.sleep) between requests to help avoid rate limits. - Caching: Basic caching for list members, spaces, folders, and lists to reduce redundant API calls.
Installation
pip install clixify
Requirements
- Python 3.8+
requestspython-dotenv(for loading API key from .env file)
Install requirements:
pip install requests python-dotenv
Configuration
Obtain your Personal API Token from your ClickUp account settings (Settings -> Apps).
Create a file named .env in the root directory of your project.
Add your API token to the .env file:
CLICKUP_TOKEN=pk_YOUR_PERSONAL_API_TOKEN_HERE
The library will automatically load the token from this environment variable. Alternatively, you can pass the token directly when initializing the client:
from clixify.client import ClickUpClient
client = ClickUpClient(token="pk_YOUR_PERSONAL_API_TOKEN_HERE")
Quick Start
import os
from dotenv import load_dotenv
from clixify.client import ClickUpClient
from clixify.team import Team
load_dotenv()
try:
client = ClickUpClient()
print("Client initialized.")
except ValueError as e:
print(f"Error: {e}")
exit()
team_manager = Team(client)
workspace_name = "Your Target Workspace Name" # <-- CHANGE THIS
my_workspace = team_manager.get_workspace(workspace_name)
if my_workspace:
print(f"Found Workspace: {my_workspace.name} (ID: {my_workspace.id})")
print("\nListing spaces...")
spaces = my_workspace.list_spaces()
if spaces:
for space in spaces:
print(f" - Space: {space.name} (ID: {space.id})")
else:
print("No spaces found in this workspace.")
else:
print(f"Workspace '{workspace_name}' not found.")
Error Handling
The library uses custom exceptions for specific known issues found in the clixify.exceptions module:
UserNotFoundByNameError: Raised during name resolution if a provided name query does not match any user.AmbiguousUserNameError: Raised if a provided name query matches multiple users. Includes details of matches found.clixifyException: Base exception for other library-specific errors.
Example:
from clixify.exceptions import UserNotFoundByNameError, AmbiguousUserNameError
try:
my_list.create_task(name="Test Ambiguity", assignees=["admin"])
except AmbiguousUserNameError as e:
print(f"Assignment failed: {e}")
print("Please use a more specific name or the User ID.")
except UserNotFoundByNameError as e:
print(f"Assignment failed: User '{e.name_query}' not found in list '{e.list_id}'.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Rate Limiting
A default delay of 0.65 seconds is automatically added before each API request in ClickUpClient.request to help prevent hitting standard ClickUp API rate limits.
Contributing
(Add contribution guidelines here if applicable)
License
(Specify your chosen license here, e.g., MIT License, Apache 2.0)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file clixify-0.1.4.tar.gz.
File metadata
- Download URL: clixify-0.1.4.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2be7830cda02da64f036eef9b1ca7728ae4989e7813cf23487c57a3cdeb9d3fb
|
|
| MD5 |
27d7bb8d63b7f271d7c0b94b809a9345
|
|
| BLAKE2b-256 |
a34d1508606a29bfa0d64bb63487c0d8b6b766052993d3a586cac03e44b74fda
|
File details
Details for the file clixify-0.1.4-py3-none-any.whl.
File metadata
- Download URL: clixify-0.1.4-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfa1e028ced687111115b705025e5c1382a8c838efde797132adaa642c576294
|
|
| MD5 |
5ce4d57bc518f685c8802b3315d40ede
|
|
| BLAKE2b-256 |
e15c4704188a0767a1cb589979a20ec93269c84be7b432619716481d7ee67baa
|