Registry / workflow / tasq-client-python

tasq-client-python

JSON →
library0.1.24pypypi✓ verified 23d ago

tasq-client-python is the official Python client library for the Tasq HTTP-based task queue server. The Tasq server (https://github.com/unixpickle/tasq) is a simple, lightweight system where tasks are pushed to a queue via HTTP endpoints, popped by workers, and then marked as complete. This client simplifies interaction with a running Tasq server, allowing Python applications to easily enqueue and process tasks. The library is currently at version 0.1.24 and has an irregular but active release cadence, tied to the development of the main Tasq server project.

pip install tasq-client-python
INSTALL
IMPORT
SIG · TASQ-CLIENT-PYTHON
T
tasq-client-python
workflowpythonv0.1.24
Install
2.1s avg
Import
397ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.24 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.328s · 21.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.308s · 22MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TasqClient
from tasq_client import TasqClient
from tasqclient import TasqClient

This quickstart demonstrates how to initialize the TasqClient, push a task to the queue, pop it, and mark it as complete. It also shows how to clear the queue and get current task counts. Ensure a Tasq server is running and accessible at the specified URL (defaults to http://localhost:8080) for the example to function correctly.

import asyncio from tasqclient import TasqClient import os TASQ_SERVER_URL = os.environ.get('TASQ_SERVER_URL', 'http://localhost:8080') async def main(): client = TasqClient(base_url=TASQ_SERVER_URL) print(f"Connected to Tasq server at {TASQ_SERVER_URL}") # Clear any existing tasks for a clean start await client.clear() print("Cleared existing tasks.") # Push a task task_content = "my-first-task-content" pushed_task = await client.push(task_content) print(f"Pushed task with ID: {pushed_task.id}, Content: {pushed_task.contents}") # Pop a task popped_task = await client.pop(timeout=0.1) # Short timeout for example if popped_task: print(f"Popped task with ID: {popped_task.id}, Content: {popped_task.contents}") # Complete the task await client.complete(popped_task.id) print(f"Completed task with ID: {popped_task.id}") else: print("No task available to pop.") # Get current counts counts = await client.get_counts() print(f"Current task counts: {counts}") if __name__ == "__main__": # Note: A Tasq server should be running at TASQ_SERVER_URL for this to work. # You can run the server using `tasq -save-path state.json` in a separate terminal. asyncio.run(main())
Debug
Known issues
gotchaThe Tasq server's persistence mechanism (when using file-based saving) has limitations. Tasks pushed between the last save and a server restart will be lost. Tasks completed during this interval may reappear in the queue upon restart, requiring workers to be idempotent and handle already-completed tasks.
fix
Implement idempotent workers that can safely re-process tasks. For critical tasks, consider more robust queueing systems with stronger guarantees, or frequently save the Tasq server state if using file persistence.
affects: All versions of Tasq server utilizing file persistence
gotchaThe PyPI project page for `tasq-client-python` lacks a detailed description or direct link to documentation. Users must refer to the main `unixpickle/tasq` GitHub repository for comprehensive usage information, server setup, and protocol details.
fix
Consult the `unixpickle/tasq` GitHub repository's README (https://github.com/unixpickle/tasq) for the most up-to-date and complete documentation.
affects: All versions
gotchaThe `tasq-client-python` library is a client for the `tasq` server (https://github.com/unixpickle/tasq). This means you need a running `tasq` server instance for the client to function. Simply installing the Python client is not enough to have a functional task queue.
fix
Before using `tasq-client-python`, ensure the `tasq` server is installed and running, accessible via HTTP at the `base_url` provided to the `TasqClient` constructor. Refer to the Tasq server's GitHub for installation and running instructions.
affects: All versions
Upgrade
Version history
0.1.24latest on PyPI · released Mar 30, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
26
OpenAI (training)
1
Resources
tasq-client-python — pip install tasq-client-python · libregistry