Task Object Storage package.
Project description
Transaction management for Robot Framework RPA using MongoDB.
Included are two packages: tos and TOSLibrary. The former is the actual task object storage implementation written in pure Python, without any Robot Framework dependencies. TOSLibrary is a Robot Framework keyword library built on top of tos. It is built as a lightweight dynamic proxy library, so all the changes in tos are immediately available in TOSLibrary keywords.
For full documentation see https://intelligent_automation.gitlab-siili.io/tos
Quickstart guide
Requirements
MongoDB (version >4)
Python (version >3.6)
Installation
Test PyPi:
pip install --extra-index https://test.pypi.org/simple task-object-storage
Usage
You can import TOSLibrary into your Robot Framework suite with
*** Settings ***
Library TOSLibrary ${db_server}:${db_port} ${db_name}
If you are using authentication in MongoDB, you can pass credentials:
*** Settings ***
Library TOSLibrary ${db_server}:${db_port} ${db_name} ${db_user} ${db_passw}
Now the keywords are callable from Robot Framework.
This library instance can also be accessed inside Python keywords with
from robot.libraries.BuiltIn import BuiltIn
BuiltIn().get_library_instance("TOSLibrary")
The keywords can be also called with:
BuiltIn().run_keyword("<keyword name>")
To use task object storage in Python without any Robot Framework dependencies you should use tos package directly:
from tos.task_object_storage import TaskObjectStorage
tos = TaskObjectStorage(
db_server=server,
db_name=db_name,
db_user=db_user,
db_passw=db_passw,
)
If db_user and db_passw are empty strings, TaskObjectStorage will default to using no authentication.
Available keywords
See the full API documentation.
Building a distribution package from source
Create a pip wheel package using
scripts/build.sh
or
python setup.py bdist_wheel
and distribute the whl package found in the dist directory.
This local package can be installed with
pip install <package-name>.whl
To upload to PyPi:
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for task_object_storage-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca9a61dbcf543fcc771ca9f6ba33a93e785cc92018c6bf568d040bef14ead19 |
|
MD5 | 2b99f3f71d0e92baf20128f104b48486 |
|
BLAKE2b-256 | cbb9aef07c6dce6092642ed5ff710879a312f5ac93bc9e5971e716b0e4f36309 |