Python SDK for the FlowTask visual task manager API
Project description
FlowTask Python SDK
A Python client for the FlowTask API — programmatically create projects, tasks, and dependency graphs.
Install
pip install -e sdk/python
Or from the SDK directory:
cd sdk/python
pip install -e .
Quick Start
from flowtask import FlowTask
# Connect with your API token (create one in the FlowTask UI → Key icon → API Tokens)
ft = FlowTask(token="ft_your_token_here", base_url="http://localhost:3000")
# Create a project
project = ft.create_project("Sprint 1", color="#6366F1")
# Create tasks
design = project.create_task("Design System", color="#8B5CF6")
build = project.create_task("Build Components", color="#3B82F6")
test = project.create_task("Write Tests", color="#10B981")
deploy = project.create_task("Deploy", color="#EF4444")
# Create dependencies (diamond-shaped DAG)
build.add_dependency(design) # Design must be done before Build
test.add_dependency(design) # Design must be done before Test
deploy.add_dependency(build) # Build must be done before Deploy
deploy.add_dependency(test) # Test must be done before Deploy
# See what's actionable right now
for task in ft.actual_tasks():
print(f"→ {task.title}")
# → Design System (the only task with no blockers)
# Complete a task and see what unblocks
design.complete()
for task in ft.actual_tasks():
print(f"→ {task.title}")
# → Build Components
# → Write Tests
API Reference
FlowTask Client
ft = FlowTask(token="ft_...", base_url="https://your-app.railway.app")
Projects
# List all projects
projects = ft.list_projects()
# Create a project
project = ft.create_project("Name", description="...", color="#6366F1")
# Load full project (tasks + dependencies)
tasks, dependencies = project.load()
# Update
project.update(name="New Name", color="#EF4444")
# Delete
project.delete()
Tasks
# Create a task in a project
task = project.create_task(
"Task Title",
description="Details...",
color="#3B82F6",
due_date="2026-04-01T00:00:00Z",
assignee="Alice",
)
# Update fields
task.update(title="New Title", description="Updated")
# Change status
task.set_status("in_progress") # or "pending", "completed"
task.complete() # shorthand for completed
# Delete
task.delete()
Dependencies
# Make task_b depend on task_a (task_a must be done first)
task_b.add_dependency(task_a)
# Or use the client directly
dep = ft.create_dependency(
enabling_task_id=task_a.id,
dependent_task_id=task_b.id
)
# Remove a dependency
ft.delete_dependency(dep.id)
Tags
# Create a tag
tag = ft.create_tag("frontend", color="#3B82F6")
# Assign to a task
task.add_tag(tag.id)
# Remove from a task
task.remove_tag(tag.id)
# List all tags
tags = ft.list_tags()
Smart Features
# Get actionable tasks (all dependencies completed)
actionable = ft.actual_tasks()
for task in actionable:
print(f"[{task.project_id}] {task.title} — {task.status}")
Error Handling
from flowtask import FlowTask, CycleDetectedError, ValidationError, NotFoundError
ft = FlowTask(token="ft_...")
try:
ft.create_dependency(task_a.id, task_b.id)
except CycleDetectedError as e:
print(f"Would create a cycle: {e.message}")
except ValidationError as e:
print(f"Invalid input: {e.message}")
except NotFoundError as e:
print(f"Not found: {e.message}")
Example: Import Tasks from CSV
import csv
from flowtask import FlowTask
ft = FlowTask(token="ft_...", base_url="http://localhost:3000")
project = ft.create_project("Imported Project")
with open("tasks.csv") as f:
for row in csv.DictReader(f):
project.create_task(
title=row["title"],
description=row.get("description", ""),
color=row.get("color"),
due_date=row.get("due_date"),
)
Example: Daily Standup Report
from flowtask import FlowTask
ft = FlowTask(token="ft_...", base_url="http://localhost:3000")
print("📋 What I can work on today:")
for task in ft.actual_tasks():
due = f" (due {task.due_date[:10]})" if task.due_date else ""
print(f" → {task.title}{due}")
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
flowtask_sdk-0.2.0.tar.gz
(9.8 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
File details
Details for the file flowtask_sdk-0.2.0.tar.gz.
File metadata
- Download URL: flowtask_sdk-0.2.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02b6f01d00bf62b5800e7f038e85aa36926fe0f5397dc7c2102b955dac79d144
|
|
| MD5 |
831d4e02333109dabfb884006887fcd7
|
|
| BLAKE2b-256 |
f28a6399f0a2f606d983568abd8b84bf44f0f1a29c64d69b8d88f6f21f1fb1ce
|
File details
Details for the file flowtask_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: flowtask_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02c36e58f4bc0aa62af0937762e44ae968f6ce8a2c57e709aaf6343f9ac67f73
|
|
| MD5 |
550934e6d55c129650cdbf611b657fcc
|
|
| BLAKE2b-256 |
121ea2e48d96b84f570f6abc265550a1bf5c0c4b6b7e725a09f72e1f491ad5b9
|