I recently switched from Slurm C API to PySlurm. I have been working on Slurm cluster monitoring apps with the focus on resource utilization, especially the memory. It is possible to extract the values of memory requested by and allocated for a particular job from TRES strings like it was done
here in jobs.py, but memory used is not readily available. In C API every instance of job_info struct contains the job_resrcs struct which holds memory usage information, ie. see the code
here. I could not find the relevant key in the dictionary returned by pyslurm.job().get(), but I think it would be a valuable add-on.
Unless it is already there, but I do not know how to get it, I would like to make a feature request to include job resources in the output dict.