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.1.0.tar.gz
(6.1 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.1.0.tar.gz.
File metadata
- Download URL: flowtask_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3cf3d1130223b3beb51290046d3618781b7b9fe17fe27b31ac1b74d119974af
|
|
| MD5 |
e80da1e58936012aed67fd2d3d72bde5
|
|
| BLAKE2b-256 |
200c59bec1fa2715c46be3a6eea14ec7377ccfe9210dc497157f335246164fcc
|
File details
Details for the file flowtask_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flowtask_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d31072ae7812cb111c18f8be0dae48b91113f602785e944375af1b32665779ed
|
|
| MD5 |
cc57d66885452c653fc3382336a1eea1
|
|
| BLAKE2b-256 |
4d5306a56c5684bf103b29bdda588a4107cd3837c6ff8cba38d3718aac3891fe
|