python-pybytesize

Community

Parse and format byte sizes reliably in Python.

Authorjjjermiah
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Byte size parsing and formatting in Python often leads to inconsistent results when mixing metric (MB, GB) with binary (MiB, GiB) units, causing subtle bugs and user confusion in apps that display or compute sizes.

Core Features & Use Cases

  • Parse strings like '500MB' or '1.5GiB' into precise byte counts and back, preserving unit distinctions.
  • Convert between metric and binary units and render human-readable representations for logs, UIs, and reports.
  • Support block-aligned calculations with apparent_size to ensure correct sizing for storage and paging scenarios.

Quick Start

Create a ByteSize from a string like '500MB' and print its readable binary and metric forms.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: python-pybytesize
Download link: https://github.com/jjjermiah/dot-agents/archive/main.zip#python-pybytesize

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.