Skip to main content

Catch an exception and exit with an exit code

Project description

Repo Status PyPI PyPI License PyPI Python Version Documentation Build Status Coverage

What is Evacuator?

Decorator/context manager designed to catch a certain exception and exit with specific exit code.

Designed to be used in Apache Airflow with:
  • BashOperator

  • SSHOperator

  • DockerOperator

  • KubernetesPodOperator

  • any other operator which can handle process exit codes.

How to install

pip install evacuator

Documentation

See https://evacuator.readthedocs.io/

Contribution guide

See CONTRIBUTING.rst

Security

See SECURITY.rst

Develop

Clone repo

Clone repo:

git clone git@github.com:MobileTeleSystems/evacuator.git -b develop

cd evacuator

Setup environment

Create virtualenv:

python -m venv venv
source venv/bin/activate
pip install -U wheel
pip install -U pip setuptools

Install dependencies for development:

# install linters, formatters, etc
pip install -U -r requirements-dev.txt

Enable pre-commit hooks

Install pre-commit hooks:

pre-commit install --install-hooks

Test pre-commit hooks run:

pre-commit run

Run tests

# install requirements for testing
pip install -U -r requirements-test.txt

# run tests
pytest

Build documentation

# install requirements for documentation
pip install -U -r requirements-docs.txt

cd docs

# generate html documentation
make html

Then open docs/_build/html/index.html file in browser.

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

evacuator-1.0.2.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

evacuator-1.0.2-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page