{ "info": { "author": "Alain Barthe", "author_email": "barthe@albar.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: System", "Topic :: Utilities" ], "description": "This module manages sizes of devices like files, block devices or system memory,\r\nas they are reported by various UNIX commands. It can be useful for people who\r\noften parse command outputs, log file, etc, looking for sizes in various units\r\nand formats to compare and compute them, then print results in a homogeneous way.\r\n\r\n>>> from Size import mkSize\r\n>>> a = mkSize('20 Gb') # Default unit is 'm'\r\n>>> b = mkSize('0.1T', 'k') # Size in kilobytes from string in Tera\r\n>>> a, b\r\n(20480.0, 107374182.40000001) # a and b are float\r\n>>> a(), b() # sizes are callable\r\n('20480 Mb', '107374182 Kb') # Results in human readable string\r\n>>> c = b - a # Sizes may be added or substracted\r\n>>> d = a * 3 # or divided or multiplied\r\n>>> d.g('%dMBytes') # Sizes may be converted in differents units\r\n'60GBytes' # and printed with differents formats\r\n>>> b.smartprint(6) # Size may be printed with the smallest unit\r\n'102 Gb' # that fills a given length\r\n>>> b.smartprint(10) # \r\n'104857 Mb'", "description_content_type": null, "docs_url": null, "download_url": "http://www.albar.fr/downloads/Size.py", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.albar.fr/Size_html/index.html", "keywords": "size system", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "Size", "package_url": "https://pypi.org/project/Size/", "platform": "Any platform", "project_url": "https://pypi.org/project/Size/", "project_urls": { "Download": "http://www.albar.fr/downloads/Size.py", "Homepage": "http://www.albar.fr/Size_html/index.html" }, "release_url": "https://pypi.org/project/Size/0.1/", "requires_dist": null, "requires_python": null, "summary": "This module manages sizes as they are reported by various UNIX commands.", "version": "0.1" }, "last_serial": 91530, "releases": { "0.1": [] }, "urls": [] }