Skip to main content

Distributed Task Framework

Project description

Task Lattice

Distributed Task Framework for distributing work across workers

CI Package version Supported Python versions


🚀 Key Features

Task Lattice's key features include:

  • Broker Support - Following brokers are supported:
    • Solace
    • Kafka (Day 2)
  • Queues - Multiple queue/priority queue support
  • Async - Async tasks supported incl. execution in event loop
  • Customisation - Extensive customisation of queue, worker and tasks including:
    • Automated task retry
    • Dead letter queues
    • Worker concurrency
    • Queue capacity
    • ...
  • Minimal code - Minimal code is required to use task lattice in your project
  • DAG support - Supports DAG (directed acyclical graph) workflow execution
  • Monitoring - Supports live monitoring of the queues, workers, tasks

ℹ️ Installation

# Using pip
pip install task-lattice

# Using poetry
poetry add task-lattice

# Using uv
uv add task-lattice

📦 Dependencies

This project's dependencies are based on the broker used. They are minimal by design.

Solace:


📘 How to use

Step 1 - Define your Task Lattice application

from task_lattice import TaskLattice, SolaceConnectionDetails, QueueDetails

app = TaskLattice(
    SolaceConnectionDetails(host="localhost", port=55555, vpn="default", username="admin", password="admin"),
    TaskLatticeConfig(
      queues=[
        QueueConfig(name="default", topic="tasks.default"),
      ], 
      default_queue="default"
    ),
)

Step 2 - Define your tasks:

@app.task
def sync_function():
  ...

@app.task
async def async_function():
  ...

Step 3 - Enqueue a task:

task = sync_function.create()

app.enqueue(task)

Step 4 - Run a worker to process tasks:

app.start_worker()

📘 Logging

Task Lattice uses the "task-lattice" logger. There are informational logs and also debugging logs.


ℹ️ License

This project is licensed under the terms of the MIT license.

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

task_lattice-0.0.1a2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

task_lattice-0.0.1a2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file task_lattice-0.0.1a2.tar.gz.

File metadata

  • Download URL: task_lattice-0.0.1a2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for task_lattice-0.0.1a2.tar.gz
Algorithm Hash digest
SHA256 e5b0f852592e437bad88b6d48bef6680a9846a2c5b2a7e8e9ff62587a0cbc804
MD5 06fb5566227d829bd0da990a88f1f0b4
BLAKE2b-256 31929249654f50ca66749e68405c6b083f3e4e160c141d41c20a12bf8a2280c0

See more details on using hashes here.

File details

Details for the file task_lattice-0.0.1a2-py3-none-any.whl.

File metadata

  • Download URL: task_lattice-0.0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for task_lattice-0.0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 120942c66850678d5edffaa46b1297b5a3cee25f319a5bca387e7748aed89e12
MD5 cfc953bd7f0cac78bc892333cdba1f15
BLAKE2b-256 b95064277bc2b3645543ce7b552149b8eff00f3f6b0cc8cfc9a25525c7e910aa

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