Metadata-Version: 2.1
Name: capturejob
Version: 0.1.5
Summary: A library to capture job outputs to persistent storage
License: MIT
Author: aurecon
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: azure-storage-blob (>=12.9.0,<13.0.0)
Requires-Dist: dotmap (>=1.3.26,<2.0.0)
Requires-Dist: dyndebug (>=0.2.0,<0.3.0)
Requires-Dist: loguru (>=0.5.3,<0.6.0)
Requires-Dist: python-dotenv (>=0.19.2,<0.20.0)
Description-Content-Type: text/markdown

# CaptureJob

This library provides the ability to copy stdout and stderr files to cloud storage.

## Usage

Programmatically it is used like this:
```
from capturejob import CaptureJob

CaptureJob()
```

but mainly its intended to be used in a dockerfile command script followng execution of a command script.

```
echo "Running batch"

cd /work && poetry run python src/etl_noop/batchrun.py

JOB="...
CAPTURE_CONNECTION_STRING="..." 
CAPTURE_CONTAINER_NAME="..."
poetry run python -m capturejob 

echo "Done"
```

## Configuration

The following environment variables need to be set

- JOB:  A name of the job which is used in the storage folder name created
- CAPTURE_CONNECTION_STRING: Azure connection string
- CAPTURE_CONTAINER_NAME: Azure container name

