sizestr
Human-readable byte counts for Python 3.11+.
Installation
pip install sizestr
Format byte counts
from sizestr import sizestr
print(sizestr(10_000)) # 9.77 KiB
print(sizestr(-42)) # -42 B
sizestr reference
sizestr(size) accepts an integer or float and returns display text. Units use
powers of 1024, from bytes through ZiB. Bytes are truncated to integers; scaled
values use two decimal places below 10 and one otherwise.
Non-finite values display as (inf), (-inf), or (nan). Values beyond ZiB
display as (too large to display).
Full reference · Issues and questions · Private security reports · Premium support
Metadata
Release files for sizestr 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sizestr-2.0.1.tar.gz | 7.3 kB | With provenance | Details for sizestr-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sizestr-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for sizestr-2.0.1-py3-none-any.whl |
Total release size: 10.7 kB
Release files / sizestr-2.0.1.tar.gz
| Download URL | sizestr-2.0.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fde757c11073fc413c568218621f3d735b18e7e2f8ffcaa256896c5f63248a50
|
|
BLAKE2b-256 checksum How to use checksums |
d7eafa779686071f28d780423ad77b9175d21d931f14df6daab585b5412fd083
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logRelease files / sizestr-2.0.1-py3-none-any.whl
| Download URL | sizestr-2.0.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
371d874a99c099c6c19cae926e4b5b3ff97ab3df5eba201a3b5a544ea31f7a51
|
|
BLAKE2b-256 checksum How to use checksums |
e707a99497ff1747c5e12fb2c7e6968ad5e56134ea14226b063132dd7f618342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logSecurity for sizestr 2.0.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sizestr-2.0.1.tar.gz
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 Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.