Skip to main content

Build Status

Command line interface client and python library for Dkron.

Prerequisites

  • Pytnon 3

Installing

To install use pip:

pip install dkron

Or clone the repo:

git clone https://github.com/Eyjafjallajokull/dkron-python.git
python setup.py install

CLI Usage

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.

Fetch all jobs

dkron-cli get jobs

It works well with jq, to list all job names:

dkron-cli get jobs | jq '.[].name'

Fetch specific job

dkron-cli get job [job_name]

Create or update job

dkron-cli apply job [json_file] ...

You can pass multiple files at once.

Execute job

dkron-cli run [job_name]

Delete job

dkron-cli delete job [job_name]

Export all jobs

dkron-cli export [backup_dir]

Cluster status

dkron-cli get status
dkron-cli get leader
dkron-cli get members

Library Usage

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')

Running tests

make test
make coverage

Metadata

Release files for dkron 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dkron 0.0.5
File Size Uploaded
dkron-0.0.5.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dkron 0.0.5
File Interpreter ABI Platform
dkron-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.6 kB

Release files / dkron-0.0.5.tar.gz

Download URL dkron-0.0.5.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6a68c0a4a32faccbdcbaa5a0e56dbb7bd0bdaf8682c9efcfd55de1977281d732
BLAKE2b-256 checksum
How to use checksums
0c4e0fc79de5c62a70d4696d60bba75655d563a39cf222d6f376dc8206f6107a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dkron-0.0.5-py2.py3-none-any.whl

Download URL dkron-0.0.5-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
513b124b1dd19579565e56ca7e36ec2d10e3aad10e82e3a63097aa317a8ab1a9
BLAKE2b-256 checksum
How to use checksums
8fd00bf3cc4b505cb0a282c71da7ba1cd3ff25ae1afde22767ce7def8d753b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page