Command line interface client and python library for Dkron.
- Pytnon 3
To install use pip:
pip install dkron
Or clone the repo:
git clone https://github.com/Eyjafjallajokull/dkron-python.git
python setup.py install
Before you begin, set environment variable DKRON_HOSTS
to point running dkron instance.
export DKRON_HOSTS=http://my-dkron.example.com,http://my-dkron-2.example.com:8080
Alternatively, you can instert --hosts
argument to every invocation of dkron-cli.
dkron-cli get jobs
It works well with jq
, to list all job names:
dkron-cli get jobs | jq '.[].name'
dkron-cli get job [job_name]
dkron-cli apply job [json_file] ...
You can pass multiple files at once.
dkron-cli run [job_name]
dkron-cli delete job [job_name]
dkron-cli export [backup_dir]
dkron-cli get status
dkron-cli get leader
dkron-cli get members
from dkron import Dkron
hosts = ['http://localhost:8080']
api = Dkron(hosts)
print(api.get_job('my-dkron-job')['error_count'])
api.run_job('my-dkron-job')
make test
make coverage