This is the orchestrator workflow engine.
Project description
Orchestrator-Core
This is the orchestrator core repository
Usage
This project can be installed as follows:
Step 1:
Install the core.
pip install orchestrator-core
Step 2:
Create a postgres database:
createuser -sP nwa
createdb orchestrator-core -O nwa
Step 3:
Create a main.py
file.
from orchestrator import OrchestratorCore
from orchestrator.cli.main import app as core_cli
from orchestrator.settings import AppSettings
app = OrchestratorCore(base_settings=AppSettings())
if __name__ == "__main__":
core_cli()
Step 4:
Initialize the migration environment.
PYTHONPATH=. python main.py db init
PYTHONPATH=. python main.py db upgrade heads
Step 5:
Profit :)
uvicorn --reload --host 127.0.0.1 --port 8080 main:app
Installation (Development)
You can develop on the core in 2 ways; as a standalone project, or if you build a project that uses the pypi package of the core you can use a cool symlink trick to get 2 editable projects.
Step 1:
Install flit:
python3 -m venv venv
source venv/bin/activate
pip install flit
Step 2:
This step depends on where you want to install the core; there are two possibilities: standalone (e.g. to run tests) or symlinked to an orchestrator-project that you're working on.
Stand alone
flit install --deps develop --symlink --python venv/bin/python
# optional: handy for tests and development
pip install redis
pip install pre-commit
Symlinked to other orchestrator-project
You can point the last parameter to the python binary in the venv you're using for your own orchestrator project. It will automatically replace the pypi dep with a symlink to the development version of the core and update/downgrade all required packages in your own orchestrator project.
flit install --deps develop --symlink --python /path/to/a/orchestrator-project/venv/bin/python
So if you have the core and your own orchestrator project repo in the same folder and the main project folder is
orchestrator
and want to use relative links:
flit install --deps develop --symlink --python ../orchestrator/venv/bin/python
Note: When you change requirements you can just re-execute "Step 2".
Running tests.
Create a database
createuser -sP nwa
createdb orchestrator-core-test -O nwa
Run tests
pytest test/unit_tests
or with xdist:
pytest -n auto test/unit_tests
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
Hashes for orchestrator_core-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32d1b24d7b2e8b4f4b93c7ff5bdfd9c5adb854bbc853f5de360a9bfe7cc4f5b |
|
MD5 | 0db57e7b5881506f24edec11565ee481 |
|
BLAKE2b-256 | c1769c3edf02df58840a43d9ac9e8ebe0136c652aef747160309d459bddef252 |