Skip to main content

sizestr

PyPI - Python Version

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.0

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

Source distribution (sdist)

Source distribution for sizestr 2.0.0
File Size Uploaded Provenance Actions
sizestr-2.0.0.tar.gz 7.2 kB With provenance Details for sizestr-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sizestr 2.0.0
File Interpreter ABI Platform Actions
sizestr-2.0.0-py3-none-any.whl Python 3 none any Details for sizestr-2.0.0-py3-none-any.whl

Total release size: 10.5 kB

Release files / sizestr-2.0.0.tar.gz

Download URL sizestr-2.0.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
37e5651d83cd39dc5218826512b95865a3d3a833b3b5aa2557c9e6c09473c826
BLAKE2b-256 checksum
How to use checksums
8dce36c387998edf034d24b4caa85ab5418595c78bfefe07f26aa2a49b8cfc0b
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 Oct 27, 2026.

Transparency log

Release files / sizestr-2.0.0-py3-none-any.whl

Download URL sizestr-2.0.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edc920064e194746bcdd32b6a339de0d952573542d9fb546b570b9ea21a8a70c
BLAKE2b-256 checksum
How to use checksums
fc1073fce5bd1b11325521fe87e45f143e75e17827651c24786b9ba04a619262
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 Oct 27, 2026.

Transparency log

Security for sizestr 2.0.0

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.

Select from 2 files

Attestation for sizestr-2.0.0.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 Oct 27, 2026.

Transparency log

A 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.

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