# robocorp-tasks
`robocorp-tasks` is a Python framework designed to simplify the development of Python automations.
## Why
While Python is widely used in the automation world, many solutions end up being ad-hoc, making it difficult to navigate different projects and keep up with the features required for analysing the results of such automations afterwards.
## How
`robocorp-tasks` provides a runner for running tasks that offers logging out of the box for Python code (showing method calls, arguments, assigns, etc) by leveraging `robocorp-log`, and managing the lifecycle for running such tasks.
## Getting started
Replace the code in your `__main__` with a method that has the name of your task (which should not have parameters) and decorate it with the `@task` decorator, like this:
i.e.:
```
from robocorp.tasks import task
@task
def my_task():
...
```
Call your task using the command line below, customizing the directory and task name as needed:
```
python -m robocorp.tasks run <path/to/file.py or directory> -t <task_name>
```
Note: if you have only one defined task in your target, the `-t <task_name>` option is not needed.
Note: the task name is the name of the method decorated with `@task`.
Note: if a directory is given, only files named `*task*.py` will be used for collection.
Note: in the current version only one task can be run per invocation. If more than one task is found an error will be given and no tasks will be run.
View the log results in `output/log.html`.
## Guides
- [Logging customization](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/00-logging-customization.md)
- [Output customization](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/01-output-customization.md)
- [Setups & Teardowns](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/02-setups-teardowns.md)
## API Reference
Explore our [API](https://github.com/robocorp/robocorp/blob/master/tasks/docs/api/README.md) for extensive documentation.
## Changelog
A list of releases and corresponding changes can be found in the [changelog](https://github.com/robocorp/robocorp/blob/master/tasks/docs/CHANGELOG.md).
Raw data
{
"_id": null,
"home_page": "https://github.com/robocorp/robocorp/",
"name": "robocorp-tasks",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Fabio Z.",
"author_email": "fabio@robocorp.com",
"download_url": "https://files.pythonhosted.org/packages/24/28/1dc707dd519b9dc29530b6705c02df71e49ad70093c04c88cb1043ff82bf/robocorp_tasks-3.1.2.tar.gz",
"platform": null,
"description": "# robocorp-tasks\n\n`robocorp-tasks` is a Python framework designed to simplify the development of Python automations.\n\n## Why\n\nWhile Python is widely used in the automation world, many solutions end up being ad-hoc, making it difficult to navigate different projects and keep up with the features required for analysing the results of such automations afterwards.\n\n## How\n\n`robocorp-tasks` provides a runner for running tasks that offers logging out of the box for Python code (showing method calls, arguments, assigns, etc) by leveraging `robocorp-log`, and managing the lifecycle for running such tasks.\n\n## Getting started\n\nReplace the code in your `__main__` with a method that has the name of your task (which should not have parameters) and decorate it with the `@task` decorator, like this:\n\ni.e.:\n\n```\nfrom robocorp.tasks import task\n\n@task\ndef my_task():\n ...\n```\n\nCall your task using the command line below, customizing the directory and task name as needed:\n\n```\npython -m robocorp.tasks run <path/to/file.py or directory> -t <task_name>\n```\n\nNote: if you have only one defined task in your target, the `-t <task_name>` option is not needed. \n\nNote: the task name is the name of the method decorated with `@task`.\n\nNote: if a directory is given, only files named `*task*.py` will be used for collection.\n\nNote: in the current version only one task can be run per invocation. If more than one task is found an error will be given and no tasks will be run.\n\nView the log results in `output/log.html`.\n\n## Guides\n\n- [Logging customization](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/00-logging-customization.md)\n- [Output customization](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/01-output-customization.md)\n- [Setups & Teardowns](https://github.com/robocorp/robocorp/blob/master/tasks/docs/guides/02-setups-teardowns.md)\n\n## API Reference\n\nExplore our [API](https://github.com/robocorp/robocorp/blob/master/tasks/docs/api/README.md) for extensive documentation.\n\n## Changelog\n\nA list of releases and corresponding changes can be found in the [changelog](https://github.com/robocorp/robocorp/blob/master/tasks/docs/CHANGELOG.md).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "The automation framework for Python",
"version": "3.1.2",
"project_urls": {
"Homepage": "https://github.com/robocorp/robocorp/",
"Repository": "https://github.com/robocorp/robocorp/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7a17845bf0d6bf67e3877af341f4cd50fe4a749c640e0f85d31a1066574c6bf3",
"md5": "ed1e9c7fe216d1f7ee31881379918be7",
"sha256": "644b55979a2991183bf9e0af33a8020ef1168aa88568b8241d7d1ea09a709d0f"
},
"downloads": -1,
"filename": "robocorp_tasks-3.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ed1e9c7fe216d1f7ee31881379918be7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 42298,
"upload_time": "2024-09-26T12:04:37",
"upload_time_iso_8601": "2024-09-26T12:04:37.932664Z",
"url": "https://files.pythonhosted.org/packages/7a/17/845bf0d6bf67e3877af341f4cd50fe4a749c640e0f85d31a1066574c6bf3/robocorp_tasks-3.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24281dc707dd519b9dc29530b6705c02df71e49ad70093c04c88cb1043ff82bf",
"md5": "db9d2e525402a266e68ba815049af0d7",
"sha256": "bc0b45e81a6e3b1a0dd4df1b2328c2b5d5ce1cb59f779cdf6fa4b8cd8cabc40a"
},
"downloads": -1,
"filename": "robocorp_tasks-3.1.2.tar.gz",
"has_sig": false,
"md5_digest": "db9d2e525402a266e68ba815049af0d7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 34851,
"upload_time": "2024-09-26T12:04:39",
"upload_time_iso_8601": "2024-09-26T12:04:39.276088Z",
"url": "https://files.pythonhosted.org/packages/24/28/1dc707dd519b9dc29530b6705c02df71e49ad70093c04c88cb1043ff82bf/robocorp_tasks-3.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-26 12:04:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "robocorp",
"github_project": "robocorp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "robocorp-tasks"
}