Skip to main content

Developers Toolbox

Convert Size

Convert file sizes between IEC (binary, 1024) and SI (decimal, 1000) units, including bits, nibbles, and bytes.

Install

pip install lupaxa-convert-size

Requires Python 3.10+.

Usage

from lupaxa.convert_size import convert_size, get_name_from_code

convert_size(1024, "B", "KiB")
# 1.0

convert_size(2000, "B", "kB", si_units=True)
# 2.0

convert_size(1, "KiB", "Kibit")
# 8.0

convert_size(1, "B", "nibble")
# 2.0

get_name_from_code("MiB")
# "Mebibyte"

convert-size is a library only. There is no console script and no python -m entry point.

Documentation

Site pages live in mkdocs/ and publish to https://convert-size.thelupaxaproject.org/.

make init
make python-install-dev
make mkdocs-serve
The Lupaxa Project Footer

Release files for lupaxa-convert-size 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lupaxa-convert-size 0.1.2
File Size Uploaded
lupaxa_convert_size-0.1.2.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-convert-size 0.1.2
File Interpreter ABI Platform
lupaxa_convert_size-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / lupaxa_convert_size-0.1.2.tar.gz

Download URL lupaxa_convert_size-0.1.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3e4ff41afb62d2516a40b5ecee6120111c1ff8de5de0beb66341197ffbefb525
BLAKE2b-256 checksum
How to use checksums
23299cbdb477fbf8186d262aa01d6a1963dd8eaa87692f26addd124974b405f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / lupaxa_convert_size-0.1.2-py3-none-any.whl

Download URL lupaxa_convert_size-0.1.2-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2302ac5f31663c6bdd81c4f45fc82b8beba20b486cb7477346106d9868971fc5
BLAKE2b-256 checksum
How to use checksums
50ca5256ee6fcfff9b2a9674bf01fc25c8c3977ce054d99fe14926fadacd9c9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page