prefixed
Prefixed alternative numeric library
Decision gist · record as of 2026-08-14
Yes, if you need automatic SI or IEC prefix formatting for numeric display. The package is stable, has no dependencies, and works across Python 2.7 and 3.5–3.13. The aging maintenance status is a minor concern for new features but not a blocker for a focused, mature library. MPLv2.0 copyleft licensing requires disclosure of modifications if you redistribute.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Maintenance status is aging—last release was in September 2024, though the repository remains active.
License · maintenance · safety
MPLv2.0 (copyleft) — Licensed under MPLv2.0 (copyleft). You must disclose source code modifications and distribute under the same license if you modify and redistribute the package.
last release 2024-09-02 (711 days) · last repo commit 2025-04-20 · 27 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 903,562 downloads/mo, #4,767 on PyPI
Alternatives
Verify before relying
from prefixed import Float
f'{Float(3250):.2h}'
# Output: '3.25k'
f'{Float(0.00001534):.2h}s'
# Output: '15.34μs'- Whether the aging maintenance status affects stability or bug-fix responsiveness for your use case.
- Compatibility with Python versions beyond 3.13 or future breaking changes in the float formatting API.
What it is and what it does
Prefixed extends Python's built-in float with custom formatting directives that automatically scale numbers into human-readable form with SI or IEC prefixes. When you format a Float instance using 'h' (SI), 'k' (IEC full), or 'm' (IEC short) presentation types, the number is divided by the appropriate power of 10 or 2 and paired with the corresponding prefix symbol—so 3250 becomes '3.25k', and 0.00001534 becomes '15.34μs'. The class inherits from float, so it behaves identically to a regular float in arithmetic and comparisons; math operations with other real numbers return Float instances, preserving the formatting capability.
The package supports a wide range of prefixes: SI includes Quetta down to Quecto, while IEC covers Yobi down to Kibi. You can also initialize Float from strings like '2k' or '2Ki' and they parse correctly. Additional formatting options include significant-digit mode (uppercase presentation types), margin adjustment to shift prefix thresholds, and a space-before-prefix flag.
Use it for
- Display file sizes or network throughput with binary prefixes: format(Float(42467328), '.2k') + 'B' yields '40.50MiB'.
- Format scientific measurements with SI prefixes: represent time intervals like 15.34 microseconds or frequency in gigahertz.
- Parse and work with human-readable numeric strings in configuration or user input: Float('2k') == 2000.0.
- Build terminal output or logging that scales automatically: avoid hardcoding unit conversions for different magnitude ranges.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need automatic SI or IEC prefix formatting for numeric display.
The package is stable, has no dependencies, and works across Python 2.7 and 3.5–3.13. The aging maintenance status is a minor concern for new features but not a blocker for a focused, mature library. MPLv2.0 copyleft licensing requires disclosure of modifications if you redistribute.
Install
prefixed on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last release was in September 2024, though the repository remains active.
License in practice
Licensed under MPLv2.0 (copyleft). You must disclose source code modifications and distribute under the same license if you modify and redistribute the package.
Quickstart
from prefixed import Float
f'{Float(3250):.2h}'
# Output: '3.25k'
f'{Float(0.00001534):.2h}s'
# Output: '15.34μs'
Verify before relying
- Whether the aging maintenance status affects stability or bug-fix responsiveness for your use case.
- Compatibility with Python versions beyond 3.13 or future breaking changes in the float formatting API.
Package facts
| License | MPLv2.0 copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 711 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 903,562 / month, #4,767 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Terminals |
Evidence: prefixed-0.9.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “SI prefix formatting”
- prefixedPrefixed provides a Float subclass that formats numbers with SI…
- bitmathbitmath converts and performs arithmetic on file sizes across SI and…
- about-timeMeasures execution time and throughput of code blocks, generators,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Terminals packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.
Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.
Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…
Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.
Install it if your application formats text for terminals and handles non-ASCII characters.
Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.
However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
See also binary · bitmath · sigfig · py-multicodec · pksuid · flake8-use-fstring · prefixdate · rounders · mgrs · overpunch