{ "info": { "author": "Kaiyu Shi", "author_email": "skyisno.1@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "calmsize\n==============\n[![Build Status](https://travis-ci.com/Stonesjtu/calmsize.svg?token=vyTdxHbi1PCRzV6disHp&branch=master)](https://travis-ci.com/Stonesjtu/calmsize)\n![PyPI](https://img.shields.io/pypi/v/calmsize.svg)\n[![PyPI download month](https://img.shields.io/pypi/dm/calmsize.svg)](https://pypi.python.org/pypi/calmsize/)\n\n\n### NOTICE\n\nI forked the repo from source file downloaded from pip `hurry.filesize`.\nThat simple library is very useful when debugging memory issues, but \nunfortunately out-of-maintainance since 2009, so I decided to fork\nthe great work of Martijn Faassen, Startifact.\n\n### Intro\n\ncalmsize a simple Python library that can take a number of bytes and\nreturns a human-readable string with the size in it, in kilobytes (K),\nmegabytes (M), etc.\n\nThe default system it uses is \"traditional\", where multipliers of 1024\nincrease the unit size::\n\n```ipython\n>>> from calmsize import size, ByteSize\n>>> size(1024)\n'1K'\n>>> size(-1024)\n'-1K'\n>>> '{:.2f}'.format(size(-1024))\n'-1.00K'\n```\n\nAn alternative, slightly more verbose system::\n\n```ipython\n>>> from calmsize import alternative\n>>> size(1, system=alternative)\n'1 byte'\n>>> size(10, system=alternative)\n'10 bytes'\n>>> size(1024, system=alternative)\n'1 KB'\n```\n\nA verbose system::\n\n```ipython\n>>> from calmsize import verbose\n>>> size(10, system=verbose)\n'10 bytes'\n>>> size(1024, system=verbose)\n'1 kilobyte'\n>>> size(2000, system=verbose)\n'1 kilobyte'\n>>> size(3000, system=verbose)\n'2 kilobytes'\n>>> size(1024 * 1024, system=verbose)\n'1 megabyte'\n>>> size(1024 * 1024 * 3, system=verbose)\n'3 megabytes'\n```\n\nYou can also use the SI system, where multipliers of 1000 increase the unit\nsize::\n\n```ipython\n>>> from calmsize import si\n>>> size(1000, system=si)\n'1K'\n```\n\nChanges\n=======\n\n0.1.2 (2019-05-27)\n----------------\n* Fix pip install fail of python2.7\n\n\n0.1.1 (2019-05-25)\n----------------\n* Fix pip install filenotfound error\n\n\n0.1.0 (2019-05-24)\n----------------\n\n* Add support for negative input\n* Add support for format the leading number\n* Add ByteSize as a new class\n* Add support for comparing between two Bytesize, ByteSize and numbers\n\n\n0.0.1 (2019-05-24)\n----------------\n\n* Forked from hurry.filesize\n\nDownload\n======", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Stonesjtu/calmsize", "keywords": "file size bytes", "license": "ZPL 2.1", "maintainer": "", "maintainer_email": "", "name": "calmsize", "package_url": "https://pypi.org/project/calmsize/", "platform": "", "project_url": "https://pypi.org/project/calmsize/", "project_urls": { "Homepage": "https://github.com/Stonesjtu/calmsize" }, "release_url": "https://pypi.org/project/calmsize/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Fork from hurry.filesize, A simple Python library for human readable file sizes (or anything sized in bytes).", "version": "0.1.3" }, "last_serial": 5324467, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9dcdd39321c3f7f2537eb4b8d24dafc0", "sha256": "46868ed6c9a7f2db7e9eac70ed16d3dbfd89c37a9eb8920b33b20550ca355eff" }, "downloads": -1, "filename": "calmsize-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9dcdd39321c3f7f2537eb4b8d24dafc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3526, "upload_time": "2019-05-25T04:50:07", "url": "https://files.pythonhosted.org/packages/6b/1b/d123ed25b771ab26314b4277f6d431eaa8dcdf148ce02f7536c9eb59f420/calmsize-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ef5668c8f1e727f52c2d68a4d4842da0", "sha256": "790db6dd0da4d650bc82bcf68ded3cf78b6a47c372b1fa350ad51bdd7e785e13" }, "downloads": -1, "filename": "calmsize-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef5668c8f1e727f52c2d68a4d4842da0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3596, "upload_time": "2019-05-25T20:42:33", "url": "https://files.pythonhosted.org/packages/88/96/0ce9eac8f9f1a01ee3a7a61b44c9baa0a63d87a0eff20a9cf4c359d5c55c/calmsize-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2566759c9a55f09d064f48dcfcc8d010", "sha256": "e1f1233228ae6b7fafc8c23e52129c7ca58fee6bcf7875ae152eee5123ba122d" }, "downloads": -1, "filename": "calmsize-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2566759c9a55f09d064f48dcfcc8d010", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3719, "upload_time": "2019-05-28T01:01:42", "url": "https://files.pythonhosted.org/packages/da/69/382ee4e1553f15321dd76109325f6a186a79354c53e8ac97cf79a2ebddbe/calmsize-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2566759c9a55f09d064f48dcfcc8d010", "sha256": "e1f1233228ae6b7fafc8c23e52129c7ca58fee6bcf7875ae152eee5123ba122d" }, "downloads": -1, "filename": "calmsize-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2566759c9a55f09d064f48dcfcc8d010", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3719, "upload_time": "2019-05-28T01:01:42", "url": "https://files.pythonhosted.org/packages/da/69/382ee4e1553f15321dd76109325f6a186a79354c53e8ac97cf79a2ebddbe/calmsize-0.1.3.tar.gz" } ] }