htcondor.htchirp API Reference

htcondor.htchirp is a Python Chirp client compatible with the condor_starter Chirp proxy server. It is intended for use inside a running HTCondor job to access files on the submit machine or to query and modify job ClassAd attributes. Files can be read, written, or removed. Job attributes can be read, and most attributes can be updated.

Jobs that use htcondor.htchirp module must have the attribute WantIOProxy set to true in the job ClassAd (My.WantIOProxy = true in the submit description). htcondor.htchirp only works for jobs run in the vanilla, paralllel, and java universes.

htcondor.htchirp provides two objects for interacting with the condor_starter Chirp proxy server, HTChirp and condor_chirp().

We recommend using HTChirp as a context manager, which automatically handles openining and closing the connection to the condor_starter Chirp proxy server:

from htcondor.htchirp import HTChirp

with HTChirp() as chirp:
    # inside this block, the connection is open
    i = chirp.get_job_attr("IterationNum")
    chirp.set_job_attr("IterationNum") = i + 1

The connection may be manually opened and closed using HTChirp.connect() and HTChirp.disconnect().

condor_chirp() is a wrapper around HTChirp that takes a string containing a condor_chirp command (with arguments) and returns the value from the relevant HTChirp method.