Format and sort byte values like 25.6MB, 5.6KB
Project description
sortbybytes
Sort and format human-readable byte-size strings.
sortbybytes provides two simple, yet powerful functions:
get_size(bytes, suffix="B")— Convert an integer byte count into a human-readable string (e.g.1253656 → "1.20 MB").sortvalue(values, reverse=False)— Sort a list of human-readable byte-size strings (e.g."25.6 MB","5.6 KB","12.5 GB") in ascending (default) or descending order.
🚀 Installation
pip install sortbybytes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sortbybytes-0.1.3.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sortbybytes-0.1.3.tar.gz.
File metadata
- Download URL: sortbybytes-0.1.3.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb4c14979d83a7672ea121723ce28fa09bec8992d559ec9e42099b2bc649295f
|
|
| MD5 |
9d71a77dbf7f8cf09a7bca17d6981823
|
|
| BLAKE2b-256 |
9f8ced0d84a2ae553a065a9f69d7d9bad47406c2c08a5b0bc8279dd112b4ab82
|
File details
Details for the file sortbybytes-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sortbybytes-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa41820381e94510b60ef259bbe13793d6771629bfa5e68f856e86401418b92
|
|
| MD5 |
c24f7670f2e99ce1d5429ef4a738523c
|
|
| BLAKE2b-256 |
01c9684ceb076d3716ea5cc8229ce9791c9dcce9846ab2575817f3fe79be6993
|