Metadata-Version: 2.1
Name: orchestrator-core
Version: 0.0.21
Summary: This is the orchestrator workflow engine.
Home-page: https://github.com/workfloworchestrator/orchestrator-core
Author: SURF
Author-email: automation-beheer@surf.nl
Requires-Python: >=3.6,<3.10
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development
Classifier: Typing :: Typed
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Dist: aiocache==0.11.1
Requires-Dist: aioredis==1.3.1
Requires-Dist: alembic~=1.5.4
Requires-Dist: click~=7.1
Requires-Dist: colorama~=0.4.4
Requires-Dist: deepmerge~=0.1.0
Requires-Dist: deprecated~=1.2.12
Requires-Dist: fastapi~=0.65.1
Requires-Dist: fastapi-etag~=0.2.2
Requires-Dist: gunicorn~=20.0.4
Requires-Dist: httptools==0.1.1
Requires-Dist: more-itertools~=8.7.0
Requires-Dist: itsdangerous~=1.1.0
Requires-Dist: Jinja2~=2.11.3
Requires-Dist: opentelemetry-api~=1.4.1
Requires-Dist: opentelemetry-exporter-jaeger~=1.4.1
Requires-Dist: opentelemetry-instrumentation-httpx~=0.23b2
Requires-Dist: opentelemetry-instrumentation-fastapi~=0.23b2
Requires-Dist: opentelemetry-instrumentation-psycopg2~=0.23b2
Requires-Dist: opentelemetry-instrumentation-redis~=0.23b2
Requires-Dist: opentelemetry-instrumentation-requests~=0.23b2
Requires-Dist: opentelemetry-instrumentation-sqlalchemy~=0.23b2
Requires-Dist: opentelemetry-instrumentation-wsgi~=0.23b2
Requires-Dist: opentelemetry-sdk==1.4.1
Requires-Dist: psycopg2-binary~=2.8.6
Requires-Dist: pydantic[email]~=1.7.4
Requires-Dist: pynso-restconf~=2.1.0
Requires-Dist: python-rapidjson==1.0
Requires-Dist: pytz
Requires-Dist: regex~=2020.11.13
Requires-Dist: requests~=2.25.1
Requires-Dist: ruamel.yaml~=0.16.12
Requires-Dist: schedule~=1.0.0
Requires-Dist: sentry-sdk
Requires-Dist: SQLAlchemy~=1.3.24
Requires-Dist: SQLAlchemy-Searchable~=1.2.0
Requires-Dist: structlog~=20.2.0
Requires-Dist: typer-cli~=0.0.11
Requires-Dist: uvicorn[standard]~=0.13.4
Requires-Dist: nwa-stdlib~=1.2.1
Requires-Dist: oauth2-lib~=1.0.8
Requires-Dist: bumpversion ; extra == "dev"
Requires-Dist: mypy_extensions ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: pydocstyle==3.0.0 ; extra == "dev"
Requires-Dist: python-dotenv ; extra == "dev"
Requires-Dist: watchdog ; extra == "dev"
Requires-Dist: pystache~=0.5.4 ; extra == "doc"
Requires-Dist: recommonmark~=0.7.1 ; extra == "doc"
Requires-Dist: Sphinx~=2.3.1 ; extra == "doc"
Requires-Dist: sphinx-autobuild~=2020.9.1 ; extra == "doc"
Requires-Dist: sphinx-rtd-theme==0.5.0 ; extra == "doc"
Requires-Dist: sphinxcontrib-apidoc~=0.3.0 ; extra == "doc"
Requires-Dist: sphinxcontrib-blockdiag~=2.0.0 ; extra == "doc"
Requires-Dist: sphinxcontrib-seqdiag~=2.0.0 ; extra == "doc"
Requires-Dist: apache-license-check ; extra == "test"
Requires-Dist: black ; extra == "test"
Requires-Dist: blinker ; extra == "test"
Requires-Dist: deepdiff ; extra == "test"
Requires-Dist: flake8 ; extra == "test"
Requires-Dist: flake8-bandit ; extra == "test"
Requires-Dist: flake8-bugbear ; extra == "test"
Requires-Dist: flake8-comprehensions ; extra == "test"
Requires-Dist: flake8-docstrings ; extra == "test"
Requires-Dist: flake8-junit-report ; extra == "test"
Requires-Dist: flake8-logging-format ; extra == "test"
Requires-Dist: flake8-pep3101 ; extra == "test"
Requires-Dist: flake8-print ; extra == "test"
Requires-Dist: flake8-rst ; extra == "test"
Requires-Dist: flake8-rst-docstrings ; extra == "test"
Requires-Dist: flake8-tidy-imports ; extra == "test"
Requires-Dist: isort ; extra == "test"
Requires-Dist: jsonref ; extra == "test"
Requires-Dist: mypy ; extra == "test"
Requires-Dist: pytest ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: pytest-httpx ; extra == "test"
Requires-Dist: pytest-xdist ; extra == "test"
Requires-Dist: requests-mock ; extra == "test"
Requires-Dist: urllib3_mock ; extra == "test"
Requires-Dist: types-Deprecated ; extra == "test"
Requires-Dist: types-Jinja2 ; extra == "test"
Requires-Dist: types-aiofiles ; extra == "test"
Requires-Dist: types-certifi ; extra == "test"
Requires-Dist: types-click ; extra == "test"
Requires-Dist: types-itsdangerous ; extra == "test"
Requires-Dist: types-orjson ; extra == "test"
Requires-Dist: types-pkg_resources ; extra == "test"
Requires-Dist: types-python-dateutil ; extra == "test"
Requires-Dist: types-pytz ; extra == "test"
Requires-Dist: types-redis ; extra == "test"
Requires-Dist: types-requests ; extra == "test"
Requires-Dist: types-toml ; extra == "test"
Requires-Dist: types-ujson ; extra == "test"
Project-URL: Documentation, https://workfloworchestrator.org/
Provides-Extra: dev
Provides-Extra: doc
Provides-Extra: test

# Orchestrator-Core
[![Downloads](https://pepy.tech/badge/orchestrator-core/month)](https://pepy.tech/project/orchestrator-core)
[![codecov](https://codecov.io/gh/workfloworchestrator/orchestrator-core/branch/main/graph/badge.svg?token=5ANQFI2DHS)](https://codecov.io/gh/workfloworchestrator/orchestrator-core)
[![pypi_version](https://img.shields.io/pypi/v/orchestrator-core?color=%2334D058&label=pypi%20package)](https://pypi.org/project/orchestrator-core)

This is the orchestrator core repository

## Usage
This project can be installed as follows:

#### Step 1:
Install the core.
```bash
pip install orchestrator-core
```

#### Step 2:
Create a postgres database:
```bash
createuser -sP nwa
createdb orchestrator-core -O nwa
```

#### Step 3:
Create a `main.py` file.

```python
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.
```bash
PYTHONPATH=. python main.py db init
PYTHONPATH=. python main.py db upgrade heads
```

### Step 5:
Profit :)

```bash
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:

```bash
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*

```bash
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.

```bash
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:

```bash
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*

```bash
createuser -sP nwa
createdb orchestrator-core-test -O nwa
```

*Run tests*

```bash
pytest test/unit_tests
```

or with xdist:

```bash
pytest -n auto test/unit_tests
```

