Metadata-Version: 2.4
Name: humanbytes
Version: 1.0.0
Summary: Convert bytes to human-readable sizes (KB, MB, KiB, MiB, etc.)
Home-page: https://github.com/Zsombroo/humanbytes
Author: Zsombroo
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary


# humanbytes

`humanbytes` is a simple Python package to convert bytes into human-readable sizes using either decimal (KB, MB, ...) or binary (KiB, MiB, ...) units.

## Features
- Convert bytes to a human-readable string
- Supports both decimal (powers of 1000) and binary (powers of 1024) units
- Minimal, dependency-free, and easy to use


## Installation

```bash
pip install humanbytes
```

## Usage


```python

from humanbytes import humanbytes

print(humanbytes(1536))                # 1.54 KB
print(humanbytes(1536, binary=True))   # 1.50 KiB
print(humanbytes(10**9))               # 1.00 GB
print(humanbytes(2**30, binary=True))  # 1.00 GiB
```

### Parameters
- `num`: The number to convert (e.g., bytes)
- `binary`: If True, use binary units (KiB, MiB, ...). If False (default), use decimal units (KB, MB, ...)

## License

MIT License. See [LICENSE](LICENSE) for details.
