Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Generate human-readable representations of numbers of bytes.

Project Description

byteformat is a Python library and command line script for displaying numbers of bytes as strings using standards-compliant human-readable units such as ‘23 KB’ or ‘1.25 terabytes’.

  • Supports both official standards and the common de facto standard:

    • SI decimal units, e.g. 1000 bytes = 1 KB;
    • IEC binary units, e.g. 1024 bytes = 1 KiB;
    • Mixed decimal names with binary sizes, e.g. 1024 bytes = 1 KB.
  • Supports the full set of decimal prefixes from kilo- to yotta- and the binary prefixes kibi- to yobi-.

  • Generate strings using symbols (e.g. ‘KB’), abbreviated names (‘Kbyte’) or full names (‘kilobyte’).

  • Uses correct plural terms when needed.

  • Automatically selects the best unit for a given number of bytes.

  • Allows the caller to explicitly override that selection and select which unit to use.

  • Easily customise the output without subclassing.

  • Importable as a Python library module.

  • Runs as a command line script.

Release History

Release History

This version
History Node

0.2a

History Node

0.1a

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
byteformat-0.2a.linux-i686.exe (71.9 kB) Copy SHA256 Checksum SHA256 any Windows Installer May 15, 2012
byteformat-0.2a.tar.gz (9.9 kB) Copy SHA256 Checksum SHA256 Source May 15, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting