A task runner that works well with poetry and uv.
Project description
Poe the Poet
A batteries included task runner that works well with poetry or uv.
Features
-
✅ Straight forward declaration of project tasks in your pyproject.toml (or poe_tasks.toml)
-
✅ Tasks are run in poetry or uv's virtualenv (or another env you specify)
-
✅ Shell completion of task names (and global options too for zsh)
-
✅ The poe CLI can be used standalone, or as a plugin for poetry
-
✅ Tasks can be commands, shell scripts, python expressions, or references to python functions
-
✅ Concise commands with extra arguments passed to the task
poe [options] task [task_args]
-
✅ Easily declare named CLI arguments for your tasks
-
✅ Tasks can specify and reference environment variables, even without a shell
-
✅ Tasks are self documenting, with optional help messages (just run
poe
with no arguments) -
✅ Works with
.env
files -
✅ Can be used as a library to embed in other tools
-
✅ Tasks can be defined in python packages for ease of reuse across projects
-
✅ Also works fine as a general purpose task runner
Quick start
- Install the Poe the Poet globally via pipx or another method.
pipx install poethepoet
Or add it as a poetry project plugin:
[tool.poetry.requires-plugins]
poethepoet = ">=0.35"
- Define some tasks in your pyproject.toml
[tool.poe.tasks]
test = "pytest --cov=my_app" # a simple command task
serve.script = "my_app.service:run(debug=True)" # python script based task
tunnel.shell = "ssh -N -L 0.0.0.0:8080:$PROD:8080 $PROD &" # (posix) shell based task
# A more complete example with documentation and named arguments
[tool.poe.tasks.count-incomplete]
help = "Count incomplete tasks in DynamoDB"
cmd = """
aws dynamodb scan --table-name tasks
--select "COUNT"
--filter-expression "status >= :status"
--expression-attribute-values '{":status":{"S":"incomplete"}}'
--no-cli-pager
"""
args = [
# Allow $AWS_REGION to be overridden with a CLI option when calling the task
{name = "AWS_REGION", options = ["--region", "-r"], default = "${AWS_REGION}"}
]
- Run your tasks via the CLI
$ poe test -v tests/unit # extra CLI arguments are appended to the underlying command
Poe => pytest --cov=my_app
...
If you're using poetry or uv, then poe will automatically use CLI tools and libraries from your project's virtualenv without you having to run poetry run
/ uv run
Poe can also be used as a general purpose task runner.
Contributing
There's plenty to do, come say hi in the discussions or open an issue! 👋
Also check out the CONTRIBUTING guide 🤓
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file poethepoet-0.35.0.tar.gz
.
File metadata
- Download URL: poethepoet-0.35.0.tar.gz
- Upload date:
- Size: 66.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b396ae862d7626e680bbd0985b423acf71634ce93a32d8b5f38340f44f5fbc3e
|
|
MD5 |
1b951b5072d4685ef7504cbefc549762
|
|
BLAKE2b-256 |
d6b1d4f4361b278fae10f6074675385ce3acf53c647f8e6eeba22c652f8ba985
|
Provenance
The following attestation bundles were made for poethepoet-0.35.0.tar.gz
:
Publisher:
ci.yml
on nat-n/poethepoet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
poethepoet-0.35.0.tar.gz
-
Subject digest:
b396ae862d7626e680bbd0985b423acf71634ce93a32d8b5f38340f44f5fbc3e
- Sigstore transparency entry: 232999536
- Sigstore integration time:
-
Permalink:
nat-n/poethepoet@23436a0bcf0144b8969feddddccc5ca0ce6cb15c
-
Branch / Tag:
refs/tags/v0.35.0
- Owner: https://github.com/nat-n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@23436a0bcf0144b8969feddddccc5ca0ce6cb15c
-
Trigger Event:
push
-
Statement type:
File details
Details for the file poethepoet-0.35.0-py3-none-any.whl
.
File metadata
- Download URL: poethepoet-0.35.0-py3-none-any.whl
- Upload date:
- Size: 87.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bed5ae1fd63f179dfa67aabb93fa253d79695c69667c927d8b24ff378799ea75
|
|
MD5 |
bacaa2c318ba2f75c3f0aaf5398085e3
|
|
BLAKE2b-256 |
3808abc2d7e2400dd8906e3208f9b88ac610f097d7ee0c7a1fa4a157b49a9e86
|
Provenance
The following attestation bundles were made for poethepoet-0.35.0-py3-none-any.whl
:
Publisher:
ci.yml
on nat-n/poethepoet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
poethepoet-0.35.0-py3-none-any.whl
-
Subject digest:
bed5ae1fd63f179dfa67aabb93fa253d79695c69667c927d8b24ff378799ea75
- Sigstore transparency entry: 232999545
- Sigstore integration time:
-
Permalink:
nat-n/poethepoet@23436a0bcf0144b8969feddddccc5ca0ce6cb15c
-
Branch / Tag:
refs/tags/v0.35.0
- Owner: https://github.com/nat-n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@23436a0bcf0144b8969feddddccc5ca0ce6cb15c
-
Trigger Event:
push
-
Statement type: