{"id":23670,"library":"engineering-notation","title":"engineering-notation","description":"Python library for converting floats to human-readable engineering notation strings (e.g., 1.5k, 3.3M, 47n). Version 0.13.2, requires Python >=3.12. Maintained actively.","status":"active","version":"0.13.2","language":"python","source_language":"en","source_url":"https://github.com/tdowling/engineering-notation","tags":["engineering notation","units","formatting","scientific notation"],"install":[{"cmd":"pip install engineering-notation","lang":"bash","label":"standard install"}],"dependencies":[],"imports":[{"note":"Direct import of EngrNumber is the standard pattern; importing the module as a namespace leads to missing the class.","wrong":"import engineering_notation as en","symbol":"EngrNumber","correct":"from engineering_notation import EngrNumber"}],"quickstart":{"code":"from engineering_notation import EngrNumber\nprint(EngrNumber(1500))  # Output: 1.5k\nprint(EngrNumber(3.3e6)) # Output: 3.3M\nprint(EngrNumber(47e-9)) # Output: 47n","lang":"python","description":"Create an EngrNumber from a float or string and print it to get engineering notation."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"Python 3.12+ is required. Older Python versions (3.11 and below) are not supported.","severity":"breaking","affected_versions":"0.6.0+"},{"fix":"Use EngrNumber('10', sig_digits=2) to ensure a prefix like 10.0 (still no prefix) or 10.0e0. For true engineering notation, values < 1000 may not get a prefix.","message":"EngrNumber('10') returns 10 with no prefix (plain number). For values exactly on a power-of-1000 boundary, the prefix might be omitted unless you specify significant digits.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install engineering-notation ; then import from engineering_notation (underscore).","cause":"The package is not installed or the import name is incorrect (using hyphen instead of underscore).","error":"ModuleNotFoundError: No module named 'engineering_notation'"},{"fix":"Change import to: from engineering_notation import EngrNumber","cause":"Common mistake: import engineering_notation as en and then use en.EngrNumber. The correct import is from engineering_notation import EngrNumber.","error":"AttributeError: module 'engineering_notation' has no attribute 'EngrNumber'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}