A wrapper for IBM ICMs Scheduler API Calls'
Project description
easy-icm-runner
Simplified Job Execution for Varicent's ICM v10 using REST APIs
Installation
pip install easy-icm-runner
Usage
This project can be used as a module within your custom program, or standalone from the command line. Below we demonstrate sample usage:
Python Usage:
The snippet below demonstrates running a job syncronously in python code. Such a method will be desirable for incorporating an ICM job step into a more complex application, or such tasks as integrating your own secret and configuration management.
"""
API Call to ICM v10 that runs a specified scheduler root/main process
"""
from easy_icm_runner.icm_runner import Runner
from easy_icm_runner.icm_runner import exec_runner
USERNAME = 'username'
PASSWORD = 'password'
MODEL_NAME = 'model'
PROCESS_NAME = 'scheduler job name'
API_KEY = 'api_key/token'
# run using instance
JOB_RUNNER = Runner(API_KEY)
JOB_RUNNER.run_process_by_name(model_name=MODEL_NAME, process_name=PROCESS_NAME)
# run using exec runners
# using api key
exec_runner(model_name=MODEL_NAME, process_name=PROCESS_NAME, api_key=API_KEY)
# using username and password
exec_runner(username=USERNAME, password=PASSWORD, model_name=MODEL_NAME,
process_name=PROCESS_NAME)
Command Line Usage:
For those of you who are not budding pythonistas, or just looking for a simple solution to job scheduling we also allow a command line entrypoint.
$ python -m easy_icm_runner.icm_runner -u "icm username" -p "icm password" -m "model name" -j "process name"
$ python -m easy_icm_runner.icm_runner -m "model name" -j "process name" -a "api key"
##### Updates in this version
- Project description was updated
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 easy_icm_runner-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c3a2d05bdf7bf6d49c97f8bf9569fa590490a4a89927362b5ac53155634c8b8 |
|
MD5 | 3af7f2811528e3d598533673d30bee66 |
|
BLAKE2b-256 | 2be4e4cde03333a53cba0a7d6f526cab05138bb9230f8000876bb638c4037830 |