{"categories":[{"label":"Terminals","url":"https://skillfed.io/packages/category/terminals"}],"enrichment":{"capability":"Prefixed provides a Float subclass that formats numbers with SI (decimal) and IEC (binary) prefixes in f-strings and format() calls, supporting units like k, M, G for SI and Ki, Mi, Gi for IEC.","skillfed_tags":["number-formatting","si-iec-prefixes"],"use_cases":["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."],"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\u2014so 3250 becomes '3.25k', and 0.00001534 becomes '15.34\u03bcs'. 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.\n\nThe 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.","worth_installing":"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\u20133.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."},"id":"prefixed","links":{"html":"https://skillfed.io/packages/prefixed","md":"https://skillfed.io/packages/prefixed.md","pypi":"https://pypi.org/project/prefixed/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-09-02","license_spdx":null,"license_treatment":"copyleft","name":"prefixed","python_support":"unspecified","summary":"Prefixed alternative numeric library"},"popularity":{"monthly_downloads":903562,"position":4767,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.9.0"}
