Skip to main content

The automation framework for Python

Project description

robocorp-tasks

robocorp-tasks is a Python framework designed to simplify the development of Python automations.

Note: The current version (2.0.0) is now in beta. Semantic versioning is used in the project.

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():
    ...
    
  1. 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.

  1. View the log results in output/log.html.

Guides

API Reference

Information on specific functions or classes: robocorp.tasks

Changelog

A list of releases and corresponding changes can be found in the changelog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robocorp_tasks-2.4.1.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

robocorp_tasks-2.4.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file robocorp_tasks-2.4.1.tar.gz.

File metadata

  • Download URL: robocorp_tasks-2.4.1.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/6.2.0-1015-azure

File hashes

Hashes for robocorp_tasks-2.4.1.tar.gz
Algorithm Hash digest
SHA256 0152e32c9e4f92cf9af9950caab1a7d92ea249c04e54a7f99feae65c01344f68
MD5 f6cd9389fca16d6a0d8af7e211ee3fe2
BLAKE2b-256 c69022068a9bd45d0a84b9114b57057c150612810f16027e3defcc692037cf43

See more details on using hashes here.

File details

Details for the file robocorp_tasks-2.4.1-py3-none-any.whl.

File metadata

  • Download URL: robocorp_tasks-2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/6.2.0-1015-azure

File hashes

Hashes for robocorp_tasks-2.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ece0ed385fb898dff3ac9ffcdfcd87d136dd03a1d13d9fd2e73848783681c850
MD5 561c26230441fc7d923db13757c76b79
BLAKE2b-256 0d8041cf998c8d3b2e4aa8688b5d16426e9ed39f7ecf7f442f94c86c907902d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page