Skip to main content

Modul for managing timeouts inside UltimateRPA

Project description

urpatimeout

urpatimeout is a module for managing timeouts inside UltimateRPA scripts.

Features

It helps you with setting up and measuring time limits:

  • set up timeout for multiple searches in UltimateRPA
  • set up timeout for part or whole of the script
  • use datetime.datetime as an input
  • no 3rd party modules dependencies

Install

pip install urpatimeout

Examples

Setting up a Global Timeout for Multiple Searches

import urpatimeout

timeout = urpatimeout.Timeout(10_000)
app = urpa.exec_app("Some_application.exe")
app.find_first(cf.name("Username").text(), timeout=timeout)
app.find_first(cf.name("Password").text(), timeout=timeout)

Setting up a Timeout for Part of the Script

import urpatimeout

timeout = urpatimeout.Timeout(60 * 60 * 1000)
while not timeout.is_expired():
	do_something()

Using datatime.datetime Object for Setting up the Timeout

import datetime
import urpatimeout

timeout = urpatimeout.Timeout(datetime.datetime(2029, 1, 15))
while not timeout.is_expired():
    do_something_else()

Reseting the Timeout

import urpatimeout
timeout = urpatimeout.Timeout(10_000)
while not timeout.is_expired():
    do_something()
    if this_happened():
        t.reset(5000)

Changelog

Changelog is here

Contribute

Issues and pull requests are welcome.

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

urpatimeout-0.2.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

urpatimeout-0.2.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

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