Skip to main content

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.5.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flowtask_sdk-0.5.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file flowtask_sdk-0.5.1.tar.gz.

File metadata

  • Download URL: flowtask_sdk-0.5.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowtask_sdk-0.5.1.tar.gz
Algorithm Hash digest
SHA256 6101188ccb703f758f46e53770be04e0ddef4e7b3fe92b5348bba0de5bddbab0
MD5 2240e8bdceabe34fbeb51046bfae9ce5
BLAKE2b-256 5c39e5dc891006a708b36f9b3f7cd1a6ee734b0bddb3758bfeb4dd64efcee2ea

See more details on using hashes here.

File details

Details for the file flowtask_sdk-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: flowtask_sdk-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flowtask_sdk-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2664ef1a801aedb203413df952413810f25442fd19b46b54682bd608c809ac2
MD5 ed96cfc0d8f30e9a7d10248818b7ec86
BLAKE2b-256 f6bd28e16587c13f255630e60123ad99635de01bf837817b4af2c7faac0d18b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page