flux.job.JobID module

class flux.job.JobID.JobID

Bases: int

Class used to represent a Flux JOBID

JobID is a subclass of int, so may be used in place of integer. However, a JobID may be created from any valid RFC 19 FLUID encoding, including:

  • decimal integer (no prefix)
  • hexidecimal integer (prefix 0x)
  • dotted hex (dothex) (xxxx.xxxx.xxxx.xxxx)
  • kvs dir (dotted hex with job. prefix)
  • RFC19 F58: (Base58 encoding with prefix ƒ or f)

A JobID object also has properties for encoding a JOBID into each of the above representations, e.g. jobid.f85, jobid.words, jobid.dothex...

dec

Return decimal integer representation of a JobID

dothex

Return dotted hexidecimal representation of a JobID

encode(encoding='dec')

Encode a JobID to alternate supported format

f58

Return RFC19 F58 representation of a JobID

hex

Return 0x-prefixed hexidecimal representation of a JobID

kvs

Return KVS directory path of a JobID

orig

Return the original string used to create the JobID

words

Return words (mnemonic) representation of a JobID

flux.job.JobID.id_encode(jobid, encoding='f58')

returns: Jobid encoded in encoding :rtype str

flux.job.JobID.id_parse(jobid_str)

returns: An integer jobid :rtype int