Technitribe

interesting problems (and a few solutions, too)

Technitribe
  • About the Authors
  • Log In
  • Log Out
  • Lost Password
  • Register
  • Reset Password
    • 3 Feb 2016

      bitmath-1.3.0 released

      Written by Tim Bielawa

      It’s been quite a while since I’ve posted any bitmath updates (bitmath is a Python module I wrote which simplifies many facets of interacting with file sizes in various units as python objects) . In fact, it seems that the last time I wrote about bitmath here was back in 2014 when 1.0.8 was released! So here is an update covering everything post 1.0.8 up to 1.3.0.

      New Features

      • A command line tool, bitmath, you can use to do simple conversions right in your shell [docs]!
      • New utility function bitmath.parse_string for parsing a human-readable string into a bitmath object
      • New utility: argparse integration: bitmath.BitmathType. Allows you to specify arguments as bitmath types
      • New utility: progressbar integration: bitmath.integrations.BitmathFileTransferSpeed. A more functional file transfer speed widget
      • New bitmath module function: bitmath.query_device_capacity(). Create bitmath.Byte instances representing the capacity of a block device
        • This my favorite enhancement
        • In an upcoming  blog post I’ll talk about just how cool I thought it was learning how to code this feature
        • Conceptual and practical implementation topics included
      • The bitmath.parse_string() function now can parse ‘octet’ based units
        • Enhancement requested in #53 parse french unit names by walidsa3d.
      • New utility function: bitmath.best_prefix()
        • Return an equivalent instance which uses the best human-readable prefix-unit to represent it
        • This is way cooler than it may sound at the surface, I promise you

      Bug Fixes

      • #49 – Fix handling unicode input in the bitmath.parse_string function. Thanks drewbrew!
      • #50 – Update the setup.py script to be python3.x compat. Thanks ssut!
      • #55 “best_prefix for negative values”. Now bitmath.best_prefix() returns correct prefix units for negative values. Thanks mbdm!

      Misc

      To help with the Fedora Python3 Porting project, bitmath now comes in two variants in Fedora/EPEL repositories (BZ1282560). The Fedora and EPEL updates are now in the repos. TIP: python2-bitmath will obsolete the python-bitmath package. Do a dnf/yum ‘update‘ operation just to make sure you catch it.

      The PyPi release has already been pushed to stable.

      Back in bitmath-1.0.8 we had 150 unit tests. The latest release has almost 200! Go testing! :confetti:

      • Tags »
      • bitmath Fedora module project Python

    One Comment on “bitmath-1.3.0 released”

    • Links 5/2/2016: Wine 1.9.3, Slackware 14.2 Beta 2 | Techrights

      05 Feb 2016 05:02 pm

      […] bitmath-1.3.0 released […]

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    • The Authors
    • Virtual Disk Guide

      Interested in virtualization? Do QCOWs rule your filesystem? Are you a libvirt or KVM+QEMU wizard? I wrote a book about virtual disk management. Check out the The Linux Sysadmin's Guide to Virtual Disks online for free at ScribesGuides.com.


      Consider supporting the author by purchasing a hard copy of the first edition for just $10.00 on Lulu.com.

    • bitmath

      bitmath is a Python library for dealing with file size units (GiB's, kB's, etc) in a sane way. bitmath supports arithmetic, rich comparison, conversion, automatic best human-readable representation, and many other utility functions. Read some examples on the docs site or check out the source on GitHub.

    • latest posts

      • Querying block device sizes in Python on Linux and Mac OS X February 4, 2023
      • Using jq to filter an array of objects from JSON September 9, 2019
      • Two Year Break — And we’re back! November 16, 2018
    • tags

      bitmath blog conference css dblatex DNS DocBook eclipse Emacs Erlang Fedora fedora 22 filter GNU Screen Haiku Introduction java jboss LCSEE Linux locale locales fix slicehost ubuntu Macports module nist nXML-Mode opengl open source OS X package packaging pki prefix units presentation project pypi Python scholarship si summit Tutorial ubuntu xcode XML XMPP
    • h4ck teh world

      tbielawatbielawa
      • Issue Comment
        bitmath
        February 6, 2023 - 12:55 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:54 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:51 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:36 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:30 am UTC

Creative Commons License
Technitribe by Tim Bielawa is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.