Skip to main content

bytesy

Turn byte counts into human-readable strings.

pip install bytesy
from bytesy import pretty_bytes

pretty_bytes(1536000)               # '1.54 MB'
pretty_bytes(1536000, binary=True)  # '1.46 MiB'
pretty_bytes(1536000, precision=0)  # '2 MB'
pretty_bytes(0)                     # '0 B'
pretty_bytes(-2048)                 # '-2.05 kB'

Options

Argument Default Meaning
binary False Use powers of 1024 (KiB, MiB, ...) instead of 1000 (kB, MB, ...)
precision 2 Maximum decimal places; trailing zeros are dropped

License

MIT

Metadata

Release files for bytesy 0.1.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 bytesy 0.1.0
File Size Uploaded Provenance Actions
bytesy-0.1.0.tar.gz 2.8 kB Without provenance Details for bytesy-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 5.9 kB

Release files / bytesy-0.1.0.tar.gz

Download URL bytesy-0.1.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c4cf8b22786712a15f1c2d634128f7817fb4fbcfe21adc6de628b67b634e885c
BLAKE2b-256 checksum
How to use checksums
3b99462dc581fce1691a3bcbb55569539aeef329e93324ec31e3d9326af0b5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / bytesy-0.1.0-py3-none-any.whl

Download URL bytesy-0.1.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b50698da70a6ece8124d19a7db18bdc94f5e8e09b3d4a0ba3c00cccf6b8be9a
BLAKE2b-256 checksum
How to use checksums
4b5c29fe28ab1990de9cc686ed545f231b46d2335e4543f24ddc50971b365709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for bytesy 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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