Registry / serialization / engineering-notation

engineering-notation

JSON →
library0.13.2pypypi✓ verified 81d ago

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.

pip install engineering-notation
INSTALL
IMPORT
SIG · ENGINEERING-NOTATI
E
engineering-notation
serializationpythonv0.13.2
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EngNumber
from engineering_notation import EngNumber
from engineering_notation import EngrNumber
EngUnit
from engineering_notation import EngUnit
eng_notation
from engineering_notation import eng_notation

Create an EngrNumber from a float or string and print it to get engineering notation.

from engineering_notation import EngrNumber print(EngrNumber(1500)) # Output: 1.5k print(EngrNumber(3.3e6)) # Output: 3.3M print(EngrNumber(47e-9)) # Output: 47n
Debug
Known issues
breakingPython 3.12+ is required. Older Python versions (3.11 and below) are not supported.
fix
Upgrade Python to 3.12 or later.
affects: 0.6.0+
gotchaEngrNumber('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.
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.
affects: all
Upgrade
Version history
0.13.2latest on PyPI · released Apr 3, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
Resources
engineering-notation — pip install engineering-notation · libregistry