A simple task runner.
Project description
Duty
A simple task runner.
Inspired by Invoke.
Requirements
Duty requires Python 3.6 or above.
To install Python 3.6, I recommend using pyenv
.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv
# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
# install Python 3.6
pyenv install 3.6.12
# make it available globally
pyenv global system 3.6.12
Installation
With pip
:
python3.6 -m pip install duty
With pipx
:
python3.6 -m pip install --user pipx
pipx install --python python3.6 duty
Quick start
Create a duties.py
file at the root of your repository.
from duty import duty
@duty
def docs(ctx):
ctx.run("mkdocs build", title="Building documentation")
You can now use the command line tool to run it:
duty docs
See the Usage section in the documentation for more examples.
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
duty-0.6.0.tar.gz
(12.2 kB
view hashes)
Built Distribution
duty-0.6.0-py3-none-any.whl
(15.0 kB
view hashes)