Skip to main content

Rundeck REST API client

PyPI PyPI - Downloads PyPI - License Python Lint

This is a Python REST API client for Rundeck 2.6+

Example

from pyrundeck import Rundeck

rundeck = Rundeck('http://rundeck-url',
                  token='sometoken',
                  api_version=32,  # this is not mandatory, it defaults to 18
                 )

run = rundeck.run_job(RUNDECK_JOB_ID, options={'option1': 'foo'})

running_jobs = rundeck.get_executions_for_job(job_id=RUNDECK_JOB_ID, status='running')

for job in running_jobs['executions']:
  print("%s is running" % job['id'])

A token can be generated in the 'profile' page of Rundeck. Alternatively you can login with a username and password.

Example using the file upload option

from pyrundeck import rundeck

rd = Rundeck(
        rundeck_url, 
        username=username, 
        password=password, 
        verify=False, 
        api_version=19  # Required for file upload option
    )
# Use the file_key returned in the response to reference the file when running a job
# Per documentation at https://docs.rundeck.com/docs/api/rundeck-api.html#upload-a-file-for-a-job-option
response = rd.upload_file(RUNDECK_JOB_ID, OPTION_NAME, FILE_NAME_STRING_OR_IOFILEWRAPPER)
file_key = response['options'][OPTION_NAME]
rd.run_job(RUNDECK_JOB_ID, options={OPTION_NAME: file_key})

See also

LICENSE

GPL3

Metadata

Release files for pyrundeck 0.10.0

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

Source distribution (sdist)

Source distribution for pyrundeck 0.10.0
File Size Uploaded Provenance Actions
pyrundeck-0.10.0.tar.gz 16.9 kB Without provenance Details for pyrundeck-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrundeck 0.10.0
File Interpreter ABI Platform Actions
pyrundeck-0.10.0-py3-none-any.whl Python 3 none any Details for pyrundeck-0.10.0-py3-none-any.whl

Total release size: 34.1 kB

Release files / pyrundeck-0.10.0.tar.gz

Download URL pyrundeck-0.10.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
80b462ffb997cfdc9337e591622c4fa3a4fa7cf22ef4e0f8f4c8a8866fb58716
BLAKE2b-256 checksum
How to use checksums
371b6ec897f466597068c7cea03fd5dcf064ce2baf7ecec0db3acad2d25b1566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pyrundeck-0.10.0-py3-none-any.whl

Download URL pyrundeck-0.10.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9a18e9fa94a6ea2f10ddd92e2bdc5fb306882a5990c469f7a75a5e5beedda25
BLAKE2b-256 checksum
How to use checksums
0d7b8cd5907a030995e6098aef0099ba77b46c1ce4d45b0fe008be192e13964c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for pyrundeck 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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