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
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 details)
Built Distribution
File details
Details for the file urpatimeout-0.2.2.tar.gz
.
File metadata
- Download URL: urpatimeout-0.2.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73c30de8d491c39f435be924470e550082f07c04d68a1836ba0ed99a3c2848fd |
|
MD5 | 22f0177653559706c3ed1ebff6b9bd80 |
|
BLAKE2b-256 | eb7311b58d07074fd28bb868e1a70dd84a4cebc7d2799c112adf083cfda7a11c |
File details
Details for the file urpatimeout-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: urpatimeout-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b6c8db4f4b2562689b4013b8d73ed2b6eb3ced4efbaef946a71f1dea6b25ab |
|
MD5 | 41f6e48d2744b0dfbe8beee3f6bf2512 |
|
BLAKE2b-256 | fc03c862c9df64bfb7c22f5c395550a6b7dfac2fc2ea4dc7d5fc6b7c77d071e2 |