Skip to main content

A task runner that works well with poetry.

Features

  • Straight foward declaration of project tasks in your pyproject.toml (kind of like npm scripts)

  • Task are run in poetry’s virtualenv by default

  • Short and sweet commands with extra arguments passed to the task poe [options] task [task_args]

  • tasks can reference environmental variables as if they were evaluated by a shell

Installation

Into your project (so it works inside poetry shell):

poetry add --dev poethepoet

And into your default python environment (so it works outside of poetry shell)

pip install poethepoet

Basic Usage

Define tasks in your pyproject.toml

See a real example

[tool.poe.tasks]
test = "pytest --cov=poethepoet"

Run tasks with the poe cli

poe test

Additional argument are passed to the task so

poe test -v tests/favorite_test.py

results in the following be run inside poetry’s virtualenv

pytest --cov=poethepoet -v tests/favorite_test.py

You can also run it like so if you fancy

python -m poethepoet [options] task [task_args]

Or install it as a dev dependency with poetry and run it like

poetry add --dev poethepoet
poetry run poe [options] task [task_args]

Though it that case you might like to do alias poe='poetry run poe'.

Advanced usage

Run poe from anywhere

By default poe will detect when you’re inside a project with a pyproject.toml in the root. However if you want to run it from elsewhere that is supported too by using the –root option to specify an alternate location for the toml file.

By default poe will set the working directory to run tasks. If you want tasks to inherit the working directory from the environment that you disable this by setting the following in your pyproject.toml.

[tool.poe]
run_in_project_root = false

In all cases the path to project root (where the pyproject.toml resides) is be available as $POE_ROOT within the command line and process.

Contributing

Don’t delay, create an issue today!

TODO

  • support “script” tasks defined as references to python functions

  • task composition/aliases

  • support declaring specific arguments for a task

  • support documenting tasks

  • support running tasks outside of poetry’s virtualenv (or in another?)

  • maybe try work well without poetry too

Licence

MIT. Go nuts.

Metadata

Release files for poethepoet 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poethepoet 0.2.0
File Size Uploaded
poethepoet-0.2.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poethepoet 0.2.0
File Interpreter ABI Platform
poethepoet-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / poethepoet-0.2.0.tar.gz

Download URL poethepoet-0.2.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4af43d1f9291891d12c6b6f8ebaf23abe34ef7ea2dcad00c1076a561ae18bb0c
BLAKE2b-256 checksum
How to use checksums
e5a45ed39c05398a239e4da1249504f6760e27ce07c7ddf9e55b38097c60a3c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.7 Linux/5.3.0-1022-azure

Release files / poethepoet-0.2.0-py3-none-any.whl

Download URL poethepoet-0.2.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bb129b83c53a9aaa2a9e0813f0e49b5f5e3f61a88b5f4c79eb9d107fd4e895e
BLAKE2b-256 checksum
How to use checksums
50046a69f7cdd6b5ac9ccb27a0e8b62319a54615ab3899a19e9526b34784249f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.7 Linux/5.3.0-1022-azure

Release history Release notifications | RSS feed

0.47.0

2 release files

0.46.0

2 release files

0.45.0

2 release files

0.42.1

2 release files

0.42.0

2 release files

0.39.0

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

0.35.1

2 release files

0.34.0

2 release files

0.33.1

2 release files

0.32.2

2 release files

0.32.0

2 release files

0.31.1

2 release files

0.31.0

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.25.1

2 release files

0.25.0

2 release files

0.24.4

2 release files

0.24.3

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.1

2 release files

0.19.0

2 release files

0.18.1

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.5

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page