Skip to main content

Enhanced Invoke task management with simplified namespacing support

Project description

Invocate

Enhanced Invoke task management with simplified namespacing support.

Purpose

I love Invoke and I use it all the time, but I find the namespace feature to be a bit cumbersome to maintain so I've written Invocate as a wrapper on top of Invoke.

Invocate overrides the task decorator to accept additional namespace-related parameters and defines a task_namespace() function that makes namespacing task a lot easier to work with.

Features

  • Namespaced Tasks: Organize tasks into hierarchical namespaces
  • Enhanced Decorator: Drop-in replacement for @task with additional features

Installation

pip install invocate

Quick Start

from invocate import task


# Simple task (no namespace)
@task
def hello(c):
    """Say hello"""
    print("Hello, World!")


# Namespaced task
@task(namespace=('build', 'frontend'))
def build_js(c):
    """Build JavaScript assets"""
    c.run("npm run build")


# Another namespaced task
@task(namespace='build.backend')
def build_python(c):
    """Build Python package"""
    c.run("python -m build")

Save this as tasks.py and run:

invocate -l

You'll see:

Available tasks:

  hello
  build.frontend.build-js
  build.backend.build-python

Advanced Usage

Customer Task Names

@task(name='custom-name', namespace=('utils',))
def some_function(c):
    pass

API Reference

task(*args, **kwargs)

Enhanced task decorator with namespace support. Parameters:

  • (tuple): Namespace hierarchy as tuple of strings namespace
  • Standard invoke task parameters (name, help, etc.)

task_namespace()

Returns the complete task collection for use with Invoke.

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

invocate-0.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

invocate-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file invocate-0.2.0.tar.gz.

File metadata

  • Download URL: invocate-0.2.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for invocate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 661f72ac53132b2e2d795718dcf246d1b7d87aedd936edfceddaca8fb13e2984
MD5 df3f54ec26cdba27b88c6f7fed4e9f2c
BLAKE2b-256 8c5181bed47963350bebff72463e432f41c37c8987712616d3a4f9e30e154975

See more details on using hashes here.

File details

Details for the file invocate-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: invocate-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for invocate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24d490d4de2d110f14ed87bff7b0fa1cb347383f31b231dad7950b4cf85d427c
MD5 1d7508e26f028f4aeeb3d22a36378474
BLAKE2b-256 aa5c333a6dfd2a1867cda946ba6b8c4a28b32096a650f30c22fc167a2c6eb49a

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