# duty
[](https://github.com/pawamoy/duty/actions?query=workflow%3Aci)
[](https://pawamoy.github.io/duty/)
[](https://pypi.org/project/duty/)
[](https://app.gitter.im/#/room/#duty:gitter.im)
A simple task runner.
Inspired by [Invoke](https://github.com/pyinvoke/invoke).

## Installation
```bash
pip install duty
```
With [`uv`](https://docs.astral.sh/uv/):
```bash
uv tool install duty
```
## Quick start
Create a `duties.py` file at the root of your repository.
```python
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:
```bash
duty docs
```
See the [Usage](https://pawamoy.github.io/duty/usage/)
section in the documentation for more examples.
Also see ["Why choosing duty over..."](https://pawamoy.github.io/duty/#why-duty-over).
Raw data
{
"_id": null,
"home_page": null,
"name": "duty",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "task-runner, task, runner, cross-platform",
"author": null,
"author_email": "=?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>",
"download_url": "https://files.pythonhosted.org/packages/c7/25/9f036ef7b1ee13a01ec2b17f34530746d20f2678a48dc63e7c41be6efb0f/duty-1.5.0.tar.gz",
"platform": null,
"description": "# duty\n\n[](https://github.com/pawamoy/duty/actions?query=workflow%3Aci)\n[](https://pawamoy.github.io/duty/)\n[](https://pypi.org/project/duty/)\n[](https://app.gitter.im/#/room/#duty:gitter.im)\n\nA simple task runner.\n\nInspired by [Invoke](https://github.com/pyinvoke/invoke).\n\n\n\n## Installation\n\n```bash\npip install duty\n```\n\nWith [`uv`](https://docs.astral.sh/uv/):\n\n```bash\nuv tool install duty\n```\n\n## Quick start\n\nCreate a `duties.py` file at the root of your repository.\n\n```python\nfrom duty import duty\n\n@duty\ndef docs(ctx):\n ctx.run(\"mkdocs build\", title=\"Building documentation\")\n```\n\nYou can now use the command line tool to run it:\n\n```bash\nduty docs\n```\n\nSee the [Usage](https://pawamoy.github.io/duty/usage/)\nsection in the documentation for more examples.\n\nAlso see [\"Why choosing duty over...\"](https://pawamoy.github.io/duty/#why-duty-over).\n",
"bugtrack_url": null,
"license": "ISC",
"summary": "A simple task runner.",
"version": "1.5.0",
"project_urls": {
"Changelog": "https://pawamoy.github.io/duty/changelog",
"Discussions": "https://github.com/pawamoy/duty/discussions",
"Documentation": "https://pawamoy.github.io/duty",
"Funding": "https://github.com/sponsors/pawamoy",
"Gitter": "https://gitter.im/duty/community",
"Homepage": "https://pawamoy.github.io/duty",
"Issues": "https://github.com/pawamoy/duty/issues",
"Repository": "https://github.com/pawamoy/duty"
},
"split_keywords": [
"task-runner",
" task",
" runner",
" cross-platform"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d5bb5ff10a9130f4c4567786a6088973f7e17dd42281c86a22f611267b89d157",
"md5": "220795568cc9d49cab65a7e5c9bd0c58",
"sha256": "4a858cc3aca1ae97648e041e50805ded98e1bd7c3273e74a0cf7746b54ca13d6"
},
"downloads": -1,
"filename": "duty-1.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "220795568cc9d49cab65a7e5c9bd0c58",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 106439,
"upload_time": "2025-02-02T16:49:19",
"upload_time_iso_8601": "2025-02-02T16:49:19.485780Z",
"url": "https://files.pythonhosted.org/packages/d5/bb/5ff10a9130f4c4567786a6088973f7e17dd42281c86a22f611267b89d157/duty-1.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c7259f036ef7b1ee13a01ec2b17f34530746d20f2678a48dc63e7c41be6efb0f",
"md5": "df94355deb8acc3a6c02e78e6d359316",
"sha256": "8be0defdee0e0b2a12d6e087b3cd81753eb1d95bb8d8d435c8f2067a0a807484"
},
"downloads": -1,
"filename": "duty-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "df94355deb8acc3a6c02e78e6d359316",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 124075,
"upload_time": "2025-02-02T16:49:21",
"upload_time_iso_8601": "2025-02-02T16:49:21.661316Z",
"url": "https://files.pythonhosted.org/packages/c7/25/9f036ef7b1ee13a01ec2b17f34530746d20f2678a48dc63e7c41be6efb0f/duty-1.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-02 16:49:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pawamoy",
"github_project": "duty",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "duty"
}