Name | lillib JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A small collection of utility functions |
upload_time | 2025-08-01 00:42:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | None |
keywords |
utilities
formatting
human-readable
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# lillib
A small collection of utility functions for Python.
## Installation
You can install the package via pip:
```bash
pip install lillib
```
## Usage
### Human-readable byte sizes
Convert byte sizes into human-readable strings:
```python
from lillib import humanbytes
# Basic usage (uses binary 1024-based units with IEC prefixes by default)
print(humanbytes(1024)) # "1.00 KiB"
print(humanbytes(1500000)) # "1.43 MiB"
# Using decimal (1000-based) units
print(humanbytes(1000, decimal=True)) # "1.00 KB"
# Control decimal places
print(humanbytes(1024, sigfig=0)) # "1 KiB"
print(humanbytes(1024, sigfig=3)) # "1.000 KiB"
# Control IEC strictness for binary units
print(humanbytes(1024, strict_iec=False)) # "1.00 KB" (non-strict)
```
## Features
- `humanbytes()`: Convert byte sizes into human-readable strings with appropriate unit prefixes
- Support for both decimal (1000-based) and binary (1024-based) units
- Support for IEC standard binary prefixes (KiB, MiB, GiB) or traditional prefixes
## License
This project is licensed under the GNU Affero General Public License v3 - see the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "lillib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "utilities, formatting, human-readable",
"author": null,
"author_email": "Lilly <ghostoverflow256@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/cf/6a/69b7984ea353ed3e8c0c8c8e93c20d8f4a9d4214f96caa8089b9c91c1847/lillib-0.2.0.tar.gz",
"platform": null,
"description": "# lillib\n\nA small collection of utility functions for Python.\n\n## Installation\n\nYou can install the package via pip:\n\n```bash\npip install lillib\n```\n\n## Usage\n\n### Human-readable byte sizes\n\nConvert byte sizes into human-readable strings:\n\n```python\nfrom lillib import humanbytes\n\n# Basic usage (uses binary 1024-based units with IEC prefixes by default)\nprint(humanbytes(1024)) # \"1.00 KiB\"\nprint(humanbytes(1500000)) # \"1.43 MiB\"\n\n# Using decimal (1000-based) units\nprint(humanbytes(1000, decimal=True)) # \"1.00 KB\"\n\n# Control decimal places\nprint(humanbytes(1024, sigfig=0)) # \"1 KiB\"\nprint(humanbytes(1024, sigfig=3)) # \"1.000 KiB\"\n\n# Control IEC strictness for binary units\nprint(humanbytes(1024, strict_iec=False)) # \"1.00 KB\" (non-strict)\n```\n\n## Features\n\n- `humanbytes()`: Convert byte sizes into human-readable strings with appropriate unit prefixes\n - Support for both decimal (1000-based) and binary (1024-based) units\n - Support for IEC standard binary prefixes (KiB, MiB, GiB) or traditional prefixes\n\n## License\n\nThis project is licensed under the GNU Affero General Public License v3 - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
"bugtrack_url": null,
"license": null,
"summary": "A small collection of utility functions",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/GhostDog98/lillib"
},
"split_keywords": [
"utilities",
" formatting",
" human-readable"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9092d36431783996c2cb04c0d66ee4586574591fef4f1d696db32232a5fb816e",
"md5": "7352942db691ee20566d81ac5b2f39b9",
"sha256": "6ad561280d8a9f177b5e18eb5b457dcc3af6c8e31fa80cdcecc84ee0cc07ab4e"
},
"downloads": -1,
"filename": "lillib-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7352942db691ee20566d81ac5b2f39b9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 16149,
"upload_time": "2025-08-01T00:42:36",
"upload_time_iso_8601": "2025-08-01T00:42:36.205709Z",
"url": "https://files.pythonhosted.org/packages/90/92/d36431783996c2cb04c0d66ee4586574591fef4f1d696db32232a5fb816e/lillib-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cf6a69b7984ea353ed3e8c0c8c8e93c20d8f4a9d4214f96caa8089b9c91c1847",
"md5": "a86805c158d92e93f1223f4afc8cb4ef",
"sha256": "1f6a69be283eb84b0e7c8c92d314244b4421545267e0091f1a8b305357517f26"
},
"downloads": -1,
"filename": "lillib-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a86805c158d92e93f1223f4afc8cb4ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15573,
"upload_time": "2025-08-01T00:42:37",
"upload_time_iso_8601": "2025-08-01T00:42:37.800320Z",
"url": "https://files.pythonhosted.org/packages/cf/6a/69b7984ea353ed3e8c0c8c8e93c20d8f4a9d4214f96caa8089b9c91c1847/lillib-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-01 00:42:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GhostDog98",
"github_project": "lillib",
"github_not_found": true,
"lcname": "lillib"
}