python runner for SAS Enterprise Gide file
Project description
Overview
This repository gets you run egp file from python or command line.
Reuirment
- windows
- python 3.6 later
- SAS Enterprise guide
Install
pip install saseg_runner
Usage
as python library
from saseg_runner import run_egp, SASEGRuntimeError run_egp(egp_path='test_success.egp', egp_version='7.1', profile_name='Your Profile') # opening SAS Enterprise Guide 7.1 # -> application instance created # activating profile:[SAS Asia] # -> profile:[SAS Asia] activated # opening test_success.egp # -> egp file opened # running test_success.egp # -> run finished # -> saved to test_success_20191031-1102.egp # getting logs from test_success_20191031-1102.egp # -> log created # successfully finished exectuing test_success.egp # elapsed_time:40[sec]
In case some tasks in the egp file fails, 'run_egp' can raise Exception of SASEGRuntimeError!
from saseg_runner import run_egp, SASEGRuntimeError run_egp(egp_path='test_fail.egp', egp_version='7.1', profile_name='Your Profile') # opening SAS Enterprise Guide 7.1 # -> application instance created # activating profile:[SAS Asia] # -> profile:[SAS Asia] activated # opening test_fail.egp # -> egp file opened # running test_fail.egp # -> run finished # -> saved to test_fail_20191031-1056.egp # getting logs from test_fail_20191031-1056.egp # -> log created # [task 2] failed in test_fail.egp # ERROR: CLI error occured: [DataDirect][ODBC lib] Specified driver could not be loaded # Traceback (most recent call last): # File "saseg_runner/runner.py", line 123, in <module> # run_egp(SCRIPTDIR_PATH.parent.parent / 'test/test_fail.egp') # File "saseg_runner/runner.py", line 103, in run_egp # raise SASEGRuntimeError # __main__.SASEGRuntimeError
Other Parameters
- egp_path : Union[str, Path]
- SAS Enterprise Guide file path.
- profile_name : str
- profile name to use
- overwrite: bool
- controls whether to save the egp file after exection. if False, timestamp is added to filename. The default is False.
- remove_log: bool
- wether remove log files or not. the default is True.
- verbose: bool
- default is False
as command line
run_egp <your egp file path>
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size saseg_runner-0.1.8-py3-none-any.whl (6.6 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Close
Hashes for saseg_runner-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87dbb71ba6f5f22deed2aa2d8143cd3a406efd6eb71077c1664892f47fbad1ca |
|
MD5 | 598cb5893589e8e21a32c592fdc98aab |
|
BLAKE2-256 | 0cc793405c46e3e6be99593146d73686912d56ac582714e1c4a8d3ea713d0212 |