https://github.com/zaczero/sizestr
Simple and fast formatting of sizes for Python
https://github.com/zaczero/sizestr
file-size human-readable humanize stringify
Last synced: 4 months ago
JSON representation
Simple and fast formatting of sizes for Python
- Host: GitHub
- URL: https://github.com/zaczero/sizestr
- Owner: Zaczero
- License: unlicense
- Created: 2024-09-14T15:56:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-14T16:02:14.000Z (about 1 year ago)
- Last Synced: 2024-09-14T16:23:38.461Z (about 1 year ago)
- Topics: file-size, human-readable, humanize, stringify
- Language: Nix
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sizestr
[](https://pypi.org/project/sizestr)
[](https://liberapay.com/Zaczero/)
[](https://github.com/sponsors/Zaczero)Simple and fast formatting of sizes for Python.
## Installation
```sh
pip install sizestr
```## Basic usage
```py
from sizestr import sizestrsizestr(10000) # '9.77 KiB'
sizestr(-42) # '-42 B'
sizestr(float('inf')) # '(inf)'
```