bytes_to_si#

controller.units.bytes_to_si(val)#

Convert a number of bytes into a human-readable SI string.

This string shows units that could be used in a Kubernetes spec.

Parameters:

val (int) – An int quantity of bytes

Returns:

A human-readable quantity of bytes, like 3Gi

Return type:

str