$npx skillfedfor your agent

bitmath

Pythonic module for representing and manipulating file sizes with different prefix notations (file size unit conversion)

Worth itPyPI LibrariesReleased May 2026396.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — bitmath-2.1.1-py3-none-any.whl
v2.1.1 · released 2026-05-25 · Python >=3.9

Yes. bitmath is actively maintained, has no dependencies, installs cleanly, carries permissive MIT licensing, and solves a concrete problem—file size unit conversion and arithmetic—that many tools need. Use it whenever you work with storage sizes and want to avoid manual conversion logic or string parsing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or newer.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained with a recent release 81 days ago and ongoing repository activity.

License · maintenance · safety

permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.

last release 2026-05-25 (81 days) · last repo commit 2026-08-14 · 96 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 396,904 downloads/mo, #6,967 on PyPI

Verify before relying

pip install bitmath

import bitmath
log_size = bitmath.kB(137.4)
log_zipped = bitmath.Byte(987)
print(log_size - log_zipped)
Same gist for agents: .md · .json

What it is and what it does

bitmath is a Python library for working with file sizes in different unit systems. It handles conversion between SI units (kB, MB, GB) and NIST binary units (KiB, MiB, GiB, and up to YiB), letting you treat sizes as first-class objects that support arithmetic, comparison, and formatting. The library includes no external dependencies beyond Python's standard library.

You use it when you need to convert between unit systems, perform capacity calculations (like fitting files on a drive), or display file sizes in human-readable form. It supports floor division and modulo for capacity planning (e.g., how many 300 MiB chunks fit in 1 GiB), rich comparisons so 1024 Bytes equals 1 KiB, and integrates with Python's format protocol and argparse for CLI tools.

Use it for

  • Convert storage sizes between SI and NIST units for display or calculation in file management tools.
  • Calculate how many files or chunks fit on a device using floor division and modulo operations.
  • Format file sizes for human-readable output in logs, reports, or interactive shells.
  • Perform arithmetic on sizes (subtract, divide, compare) without manual unit conversion.
  • Parse and validate file size input from command-line arguments or user configuration.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

bitmath is actively maintained, has no dependencies, installs cleanly, carries permissive MIT licensing, and solves a concrete problem—file size unit conversion and arithmetic—that many tools need. Use it whenever you work with storage sizes and want to avoid manual conversion logic or string parsing.

Install

bitmath on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a recent release 81 days ago and ongoing repository activity.

Requires Python 3.9 or newer.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.

Quickstart

pip install bitmath

import bitmath
log_size = bitmath.kB(137.4)
log_zipped = bitmath.Byte(987)
print(log_size - log_zipped)

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 81 days since the last release
Last repo commit
First released
Downloads396,904 / month, #6,967 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Communications :: File SharingTopic :: InternetTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: AcceptanceTopic :: Software Development :: Testing :: UnitTopic :: System :: FilesystemsTopic :: System :: Systems AdministrationTopic :: Text Processing :: FiltersTopic :: Utilities

Evidence: bitmath-2.1.1-py3-none-any.whl

Tags

Capabilities
file size unit conversionbyte size arithmeticSI NIST prefix conversionhuman readable file sizesstorage capacity mathGiB MiB KiB conversionfile size formatting
Topics
file-size-conversionunit-conversionstorage-math

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 › “byte size arithmetic”

  • bitmathbitmath converts and performs arithmetic on file sizes across SI and…
  • hurry.filesizeConverts byte counts into human-readable file size strings using…
  • cobsEncodes and decodes data using Consistent Overhead Byte Stuffing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also binary · hurry.filesize · prefixed · django-mathfilters · anycrc · pyroaring · tibs · fxpmath · fixedint