A package containing OpenOrchestrator and OpenOrchestrator Scheduler
Project description
OpenOrchestrator
Read the documentation here.
Package is located at Pypi.
Usage for Orchestrator admins
OpenOrchestrator provides a commandline interface (cli) to start the different parts of the application.
For a full explanation run python -m OpenOrchestrator -h in the command line.
The most common commands would be:
python -m OpenOrchestrator o for orchestrator.
python -m OpenOrchestrator s for scheduler.
Usage for RPA developers
Import the connection module to your RPA code and get access to the orchestrator methods;
- logging status to OpenOrchestrator
- getting credentials and constants from OpenOrchestrator
- creating, getting and updating job elements in a queue
Run the code with arguments
python run.py "<process name>" "<connection string>" "<secret key>" "<arguments>"
# run.py
# connect to OpenOrchestrator and log something
from OpenOrchestrator.orchestrator_connection.connection import OrchestratorConnection
oc = OrchestratorConnection.create_connection_from_args()
oc.log_trace("open orchestrator connected.")
Installation
Requires Python 3.10 or later.
Install using pip install OpenOrchestrator
Creating or upgrading a database
If you need to create a new database or upgrade to a new revision follow these steps:
- Download this repository either via Github or Git.
- Open a command line in the project folder.
- Run the following commands:
python -m venv .venv
.venv\scripts\activate
pip install .[alembic]
python -m OpenOrchestrator upgrade "<Your connection string here>"
This will automatically bring you to the newest revision of the database.
Contributing
Setup
To start developing for OpenOrchestrator pull the current develop branch using GIT.
In the new folder run the following commands in the command line:
python -m venv .venv
.venv\scripts\activate
pip install -e .
This will create a new virtual environment and install the project in 'editable' mode. This means that any changes to the code is automatically included in the installation.
Automated Tests
OpenOrchestrator contains automated tests.
Before running the tests you need to define the following environment variables:
SET CONN_STRING="<connection string to test db>"
Examples of connection strings:
- mssql+pyodbc://localhost\SQLEXPRESS/OO_Unittest?driver=ODBC+Driver+17+for+SQL+Server
- sqlite+pysqlite:///test_db.db
To run tests execute the following command from the main directory:
python -m unittest discover
Manual Tests
Not all functionality is covered by automated tests. Especially the Scheduler app is not covered well.
Refer to the manual_tests.txt file for a list of things that should be tested.
Creating new database revisions
If your update requires a change to the database schemas you need to create a new revision schema in the alembic folder.
This can mostly be done automatically by the following steps:
-
First make sure your database is on the previous version of the database schema.
-
Make sure any new ORM classes are imported in
alembic/env.py. -
Then run the following command (replacing the connection string and message):
alembic -x "connection_string" revision --autogenerate -m "Some useful message"
This will create a new file in the
alembic/versionsfolder with a random prefix and then your message as the name. -
Open the file and make sure the contents make sense. Obvious changes are detected automatically but some changes might not be.
-
Update the expected revision number in
db_util.py > check_database_revision.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openorchestrator-2.0.1.tar.gz.
File metadata
- Download URL: openorchestrator-2.0.1.tar.gz
- Upload date:
- Size: 56.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cba3fc725a8dc765db4ac84a45c3fe6e7319bb1783858e504e8756829d34fd88
|
|
| MD5 |
99ca3234c3220eeaff498a45c7dbe4b2
|
|
| BLAKE2b-256 |
7cea7353a58cb5487f39c0032907db867f50c20d2bf62d47737d95c07b8118a9
|
File details
Details for the file openorchestrator-2.0.1-py3-none-any.whl.
File metadata
- Download URL: openorchestrator-2.0.1-py3-none-any.whl
- Upload date:
- Size: 63.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13289f61e5d04476d44976136e2702dd80f56eccfd15d79ecfb25f7b89c5f781
|
|
| MD5 |
6a15070e708241c0e8df65fccb6006a4
|
|
| BLAKE2b-256 |
df7d390d37155e22a0feb234e98754b8425466569e5f9b4b0055dbdeae4fbeb2
|