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.8.3.tar.gz (7.5 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for humanfriendly-1.8.3.tar.gz
Algorithm Hash digest
SHA256 1965e5f0358bbe388d0072af7d9c4038b9ef02840d57d12e97f8890ff44bc232
MD5 00d5644bf4289221d53b8a987039b4a5
BLAKE2b-256 c277bceaa84fea9c7572e1bb4582dcc1cc4ba1034156b4cfc948886ed51fe42c

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

1.19

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

This release

1.8.3 This release

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