Skip to main content
https://travis-ci.org/xolox/python-humanfriendly.svg?branch=master https://coveralls.io/repos/xolox/python-humanfriendly/badge.png?branch=master

The functions in the humanfriendly package can be used to make text interfaces more user friendly by parsing and formatting file sizes and timestamps in simple, human readable formats. It’s currently tested on Python 2.6, 2.7 and 3.4.

Getting started

It’s very simple to start using the humanfriendly package:

>>> import humanfriendly
>>> user_input = raw_input("Enter a readable file size: ")
Enter a readable file size: 16G
>>> num_bytes = humanfriendly.parse_size(user_input)
>>> print num_bytes
17179869184
>>> print "You entered:", humanfriendly.format_size(num_bytes)
You entered: 16 GB

Contact

The latest version of humanfriendly is available on PyPI and GitHub. The documentation is hosted on Read the Docs. For bug reports please create an issue on GitHub. If you have questions, suggestions, etc. feel free to send me an e-mail at peter@peterodding.com.

License

This software is licensed under the MIT license.

© 2013 Peter Odding.

Download files

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

Source Distribution

humanfriendly-1.19.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file humanfriendly-1.19.tar.gz.

File metadata

  • Download URL: humanfriendly-1.19.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for humanfriendly-1.19.tar.gz
Algorithm Hash digest
SHA256 8a2d6ad002ea46c2c4b5034090e9cb9c4fc82f6fee7c44ad7afff5c6d2003933
MD5 dd50cc463227a34f0b899abb15baeab7
BLAKE2b-256 b4ff71bb2dbf25d449e0fbb8df970cf46c9ab0132d7d82bc640b1152984797bd

See more details on using hashes here.

Release history Release notifications | RSS feed

10.0

2 files

9.2

2 files

9.1

2 files

9.0

2 files

8.2

2 files

8.1

2 files

8.0

2 files

7.3

2 files

7.2

2 files

7.1.1

2 files

7.1

2 files

7.0

2 files

6.1

2 files

6.0

2 files

5.0

2 files

4.18

2 files

4.17

2 files

4.16.1

2 files

4.16

2 files

4.15.1

2 files

4.15

2 files

4.14

2 files

4.13

2 files

4.12.1

2 files

4.12

2 files

4.11

2 files

4.10

2 files

4.9

2 files

4.8

2 files

4.7

2 files

4.6

2 files

4.5

2 files

4.4.2

2 files

4.4.1

2 files

4.4

2 files

4.3

2 files

4.2

2 files

4.1

2 files

4.0

2 files

3.8

2 files

3.7

2 files

3.6.1

2 files

3.6

2 files

3.5

2 files

3.4.1

2 files

3.4

2 files

3.3

2 files

3.2

2 files

3.1

2 files

3.0

2 files

2.4

2 files

2.3.2

2 files

2.3.1

2 files

2.3

2 files

2.2.1

2 files

2.2

2 files

2.1

2 files

2.0.1

2 files

2.0

2 files

1.44.9

2 files

1.44.8

1 file

1.44.7

1 file

1.44.6

1 file

1.44.5

1 file

1.44.4

1 file

1.44.3

1 file

1.44.2

1 file

1.44.1

1 file

1.43.1

1 file

1.43

1 file

1.42

1 file

1.41

1 file

1.40

1 file

1.38

1 file

1.37

1 file

1.36

1 file

1.35

1 file

1.33

1 file

1.32

1 file

1.31

1 file

1.30

1 file

1.29

1 file

1.27

1 file

1.26

1 file

1.25.1

1 file

1.25

1 file

1.24

1 file

1.23.1

1 file

1.23

1 file

1.22

1 file

1.21

1 file

1.20

1 file

This release

1.19 This release

1 file

1.17

1 file

1.16

1 file

1.15

1 file

1.14

1 file

1.13

1 file

1.11

1 file

1.10

1 file

1.9.6

1 file

1.9.4

1 file

1.9.3

1 file

1.9.2

1 file

1.9.1

1 file

1.9

1 file

1.8.6

1 file

1.8.4

1 file

1.8.3

1 file

1.8.2

1 file

1.8.1

1 file

1.8

1 file

1.7.1

1 file

1.7

1 file

1.6

1 file

1.5

1 file

1.4.2

1 file

1.4.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page