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
@taskwith 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.
Metadata
Release files for invocate 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| invocate-0.2.1.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| invocate-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / invocate-0.2.1.tar.gz
| Download URL | invocate-0.2.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
631f3a2262a7290164f9b24156f9436151c81593ce4872bb86e3784f3585c2c0
|
|
BLAKE2b-256 checksum How to use checksums |
b89f46f6d800838a005fe5957f80fedc8dda022f99a62200037c1fc9bb1a9b79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / invocate-0.2.1-py3-none-any.whl
| Download URL | invocate-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c880afdd57336fd949cfc70675cadeb66c4fb2bc10bba6b82140a4db1cd8a53b
|
|
BLAKE2b-256 checksum How to use checksums |
97449db7e48e1cc02280ff01a2d7beb65f2ebc29d766e6e9e428edf641a89026
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|