Собрали в одном месте самые важные ссылки
читайте авторский блог
>>> from ballpark import human, scientific, engineering, business >>> business([11234.22, 233000.55, 1175125.2]) ['11K', '233K', '1,180K'] >>> >>> # or use the shortcut functions >>> from ballpark import H, S, E, B >>> B([11234.22, 233000.55, 1175125.2]) ['11K', '233K', '1,180K'] >>> >>> # all notations accept single numbers too, but then we can't >>> # guarantee that all numbers will have the same prefix (kilo, mega etc.) >>> [B(value) for value in [11234.22, 233000.55, 1175125.2]] ['11.2K', '233K', '1.18M']