Skip to main content

pydkron: Python Client for Dkron

Project description

pydkron - Python Library for Interacting with Dkron

Build Status

Requirements

requests

Installing

Pip

pip install pydkron

Manually

git clone https://github.com/oldmantaiter/pydkron
cd pydkron
python setup.py install

Usage Examples

from pydkron.client import DkronClient

# Return all the configured jobs
client = DkronClient(hosts=["dkron01:8080", "dkron02:8080"])
for job in client.jobs():
    print "%s runs %s" % (job.name, job.schedule)

# Get a job by name
job = client.get_job("job1")

# Delete a job
job.delete()

# Create a new job
data = {
    "name": "job2",
    "schedule": "@every 2m",
    "command": "run stuff",
    "owner": "Tait Clarridge",
    "tags": {
        "role": "dkron:1",
    }
}

job = client.create_job(data)

# Update a job (change the schedule)

job.schedule = "@every 2m"
job.save()

# Run a job
job.run()

# List executions
print job.executions()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydkron-0.2.4.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file pydkron-0.2.4.tar.gz.

File metadata

  • Download URL: pydkron-0.2.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.5

File hashes

Hashes for pydkron-0.2.4.tar.gz
Algorithm Hash digest
SHA256 f93266e6d00d67d866260b3517d45e7b10e9260d898a04255ee1a9c0582cc5af
MD5 7d931c4703ad9a7bd5a71b103154c3c3
BLAKE2b-256 4307293d8c887767c1e9bab19eff80c3e1f0399eb854f69c7f0abcb1cdefe5d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page