Skip to content

Commit 3c8de96

Browse files
committed
python: add emoji property to JobID class
Problem: A Python JobID object can't return the emoji encoding of a jobid since there's no corresponding class property. Add an `emoji` property to the JobID class which returns the emoji encoding of the jobid.
1 parent 6e9499c commit 3c8de96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bindings/python/flux/job/JobID.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class JobID(int):
4545
- dotted hex (dothex) (xxxx.xxxx.xxxx.xxxx)
4646
- kvs dir (dotted hex with `job.` prefix)
4747
- RFC19 F58: (Base58 encoding with prefix `ƒ` or `f`)
48+
- basemoji (emoji encoding)
4849
4950
A JobID object also has properties for encoding a JOBID into each
5051
of the above representations, e.g. jobid.f85, jobid.words, jobid.dothex...
@@ -92,6 +93,11 @@ def words(self):
9293
"""Return words (mnemonic) representation of a JobID"""
9394
return self.encode("words")
9495

96+
@property
97+
def emoji(self):
98+
"""Return emoji representation of a JobID"""
99+
return self.encode("emoji")
100+
95101
@property
96102
def kvs(self):
97103
"""Return KVS directory path of a JobID"""

0 commit comments

Comments
 (0)