{ "info": { "author": "Bart Robinson", "author_email": "bart@bartrobinson.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "frepr\n=====\n.. image:: https://travis-ci.org/wemoloh/frepr.svg?branch=master\n :target: https://travis-ci.org/wemoloh/frepr\n\nFast float ``repr()`` for CPython using\n``_. Approximately 8X faster than\nthe built-in function.\n\n\nQuick Start\n===========\n\n.. code-block:: python\n\n >>> import frepr\n >>> frepr.frepr(-1.8397892359791307e+134)\n '-1.8397892359791307e+134'\n >>> from timeit import timeit\n >>> timeit('repr(-1.8397892359791307e+134)')\n 2.7296602272476758\n >>> frepr.install()\n >>> timeit('repr(-1.8397892359791307e+134)')\n 0.35723431229251545\n >>> frepr.uninstall()\n\n\nAPI\n===\n\n``frepr.frepr(value)``\n----------------------\n\nReturns shortest string representation of a floating point value. The argument\ndoesn't have to be a ``float``, as long as it is coercible to one (i.e. it has\na ``__float__()`` method).\n\n``frepr.install()``\n-------------------\n\nMonkey-patches the Python runtime. Subsequent calls to ``repr()`` on floats\nwill use the faster algorithm. This is safe to call multiple times.\n\n``frepr.uninstall()``\n---------------------\n\nReverses the monkey-patching done by ``install()``. Subsequent calls to\n``repr()`` will use the original built-in algorithm. This is safe to call\nmultiple times, even if ``install()`` was not called first.\n\n\nFeatures\n========\n\n* On average, approximately 8X faster than the standard function. (This result\n obtained on Python 3.6.0 64-bit/Windows 7/Intel Core i3 @ 2.93GHz. Test your\n own system with `tests/perf.py `_).\n* Speeds up the standard ``json`` package (and any other library that relies on\n ``repr()``).\n* Output is guaranteed to contain the shortest string of decimal digits\n necessary to uniquely identify the original IEEE 754 floating-point value.\n* Guaranteed to satisfy ``value == ast.literal_eval(frepr(value))``.\n* Tested on CPython 2.6 through 3.6; probably works on other versions too.\n\n\nLimitations\n===========\n\n* Currently, there is no support for alternative Python implementations (e.g.\n PyPy).\n* Output can be slightly different from the native function, due to\n floating-point rounding (but see accuracy guarantees above).\n* Has no effect on other built-in methods of converting floats to strings (e.g.\n ``str()``, ``str.format()``, ``\"%f\"``, ``\"%g\"``).\n\n\nSee Also\n========\n\n* ``_ - Core algorithm\n implementation. This is the same implementation used by Chrome's V8\n JavaScript engine, among others.\n* ``_ - CPython issue from 2011 about this\n idea.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wemoloh/frepr", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "frepr", "package_url": "https://pypi.org/project/frepr/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/frepr/", "project_urls": { "Homepage": "https://github.com/wemoloh/frepr" }, "release_url": "https://pypi.org/project/frepr/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Fast float repr", "version": "0.1.1" }, "last_serial": 2653724, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "491c1e199c36d3734ab6997b8bf56530", "sha256": "c20534b26f358ef18e1db7c9c2ab50729a7d0271509cc222bf101f234266c9f4" }, "downloads": -1, "filename": "frepr-0.1.1-cp27-cp27m-win32.whl", "has_sig": false, "md5_digest": "491c1e199c36d3734ab6997b8bf56530", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 26742, "upload_time": "2017-02-20T00:03:38", "url": "https://files.pythonhosted.org/packages/9d/98/9fe7b102d000448fa86761abaf5a816e308c6f9589ea786ff428dec7100d/frepr-0.1.1-cp27-cp27m-win32.whl" }, { "comment_text": "", "digests": { "md5": "635cc01911259671506a4b3c8f34e421", "sha256": "b6c13f9eb8f5a739020832003e8e9547e38518a4df1f3c469cb73757e2487c8c" }, "downloads": -1, "filename": "frepr-0.1.1-cp27-cp27m-win_amd64.whl", "has_sig": false, "md5_digest": "635cc01911259671506a4b3c8f34e421", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 31128, "upload_time": "2017-02-20T00:03:41", "url": "https://files.pythonhosted.org/packages/97/db/1ca8018a6ca5f765c218e4ce98d0259ddf8f55adeb75fcd262f1956f2ae0/frepr-0.1.1-cp27-cp27m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "f75bb717774f74d77a67bdfed2ff27d3", "sha256": "e4174c4ad88416e76a9ea69ab1b3b3306488c40e1ab78f07a6213de8c5355ed1" }, "downloads": -1, "filename": "frepr-0.1.1-cp34-cp34m-win32.whl", "has_sig": false, "md5_digest": "f75bb717774f74d77a67bdfed2ff27d3", "packagetype": "bdist_wheel", "python_version": "cp34", "requires_python": null, "size": 26663, "upload_time": "2017-02-20T00:03:43", "url": "https://files.pythonhosted.org/packages/db/04/ee015654c91028e5d8ca064806438b3bd0afbf3805a58b87d9f8630e91c7/frepr-0.1.1-cp34-cp34m-win32.whl" }, { "comment_text": "", "digests": { "md5": "70dd121dbec4aa5d1c819fa2f76285ae", "sha256": "a0bc461ceb128f072f59b2363a8f3df263664f40c7752029babdb2dd4dc1963f" }, "downloads": -1, "filename": "frepr-0.1.1-cp34-cp34m-win_amd64.whl", "has_sig": false, "md5_digest": "70dd121dbec4aa5d1c819fa2f76285ae", "packagetype": "bdist_wheel", "python_version": "cp34", "requires_python": null, "size": 31452, "upload_time": "2017-02-20T00:03:45", "url": "https://files.pythonhosted.org/packages/68/27/99100364d1f99ccd9d04e6147ec9b19ebb58ba976fa49d8f3061549b6554/frepr-0.1.1-cp34-cp34m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "3ece0e7e1ca4c8be9eb833da1cce5998", "sha256": "c84a066df6bee5df4f920c3d7817cb1bf94fdf262b6b828325fc7f61fd9c3872" }, "downloads": -1, "filename": "frepr-0.1.1-cp35-cp35m-win32.whl", "has_sig": false, "md5_digest": "3ece0e7e1ca4c8be9eb833da1cce5998", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 20803, "upload_time": "2017-02-20T00:03:47", "url": "https://files.pythonhosted.org/packages/3f/4f/58a281854b6adde87829610947e49190271e8617d3d2120847636a7f1804/frepr-0.1.1-cp35-cp35m-win32.whl" }, { "comment_text": "", "digests": { "md5": "cb08d66faf9001a291a039afdc0dae48", "sha256": "69a027a4605a8a5a4123cc91ad6f4d858d797116d20f604553df641cf53a469f" }, "downloads": -1, "filename": "frepr-0.1.1-cp35-cp35m-win_amd64.whl", "has_sig": false, "md5_digest": "cb08d66faf9001a291a039afdc0dae48", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 25126, "upload_time": "2017-02-20T00:03:50", "url": "https://files.pythonhosted.org/packages/6e/3a/abd2a0e15a986e307d0d9b65ec167249792e47e5bf9f90522d33d63e7f30/frepr-0.1.1-cp35-cp35m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "5c93b6cd5fbe3a37924b466e1e91dae0", "sha256": "466b4284b1e952c3e81c17208f709f2fbc1723b9a5deb9a9acbfeb90f4e86c35" }, "downloads": -1, "filename": "frepr-0.1.1-cp36-cp36m-win32.whl", "has_sig": false, "md5_digest": "5c93b6cd5fbe3a37924b466e1e91dae0", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 20801, "upload_time": "2017-02-20T00:03:52", "url": "https://files.pythonhosted.org/packages/43/fa/ef937630bdb23aa295d4fc688bf15fccc51a47b19b29b54dbe0bdeb35e44/frepr-0.1.1-cp36-cp36m-win32.whl" }, { "comment_text": "", "digests": { "md5": "94c7d1a82d3f1d7a660b4e0b7ba2471a", "sha256": "c7735e6a22fff426aaa28c274986de0eddfc7e3599aca42af9fd6095f50ad77d" }, "downloads": -1, "filename": "frepr-0.1.1-cp36-cp36m-win_amd64.whl", "has_sig": false, "md5_digest": "94c7d1a82d3f1d7a660b4e0b7ba2471a", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 25125, "upload_time": "2017-02-20T00:03:54", "url": "https://files.pythonhosted.org/packages/c3/d3/e3b048ae321334ab83046f198e7ec7bcea04c3652562d2929a4310e2bd95/frepr-0.1.1-cp36-cp36m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "c58c816901905f0627c3ac56cc0ac634", "sha256": "c87f9a996b7767a887a4b1590b1ab6cbe33825e3793b505cc07f172152b294b4" }, "downloads": -1, "filename": "frepr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c58c816901905f0627c3ac56cc0ac634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58197, "upload_time": "2017-02-20T00:03:56", "url": "https://files.pythonhosted.org/packages/71/6b/d9f3514a2a10b628b485f4b3a99119e70a7c99c748f03e9443e87e3cb39d/frepr-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "491c1e199c36d3734ab6997b8bf56530", "sha256": "c20534b26f358ef18e1db7c9c2ab50729a7d0271509cc222bf101f234266c9f4" }, "downloads": -1, "filename": "frepr-0.1.1-cp27-cp27m-win32.whl", "has_sig": false, "md5_digest": "491c1e199c36d3734ab6997b8bf56530", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 26742, "upload_time": "2017-02-20T00:03:38", "url": "https://files.pythonhosted.org/packages/9d/98/9fe7b102d000448fa86761abaf5a816e308c6f9589ea786ff428dec7100d/frepr-0.1.1-cp27-cp27m-win32.whl" }, { "comment_text": "", "digests": { "md5": "635cc01911259671506a4b3c8f34e421", "sha256": "b6c13f9eb8f5a739020832003e8e9547e38518a4df1f3c469cb73757e2487c8c" }, "downloads": -1, "filename": "frepr-0.1.1-cp27-cp27m-win_amd64.whl", "has_sig": false, "md5_digest": "635cc01911259671506a4b3c8f34e421", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 31128, "upload_time": "2017-02-20T00:03:41", "url": "https://files.pythonhosted.org/packages/97/db/1ca8018a6ca5f765c218e4ce98d0259ddf8f55adeb75fcd262f1956f2ae0/frepr-0.1.1-cp27-cp27m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "f75bb717774f74d77a67bdfed2ff27d3", "sha256": "e4174c4ad88416e76a9ea69ab1b3b3306488c40e1ab78f07a6213de8c5355ed1" }, "downloads": -1, "filename": "frepr-0.1.1-cp34-cp34m-win32.whl", "has_sig": false, "md5_digest": "f75bb717774f74d77a67bdfed2ff27d3", "packagetype": "bdist_wheel", "python_version": "cp34", "requires_python": null, "size": 26663, "upload_time": "2017-02-20T00:03:43", "url": "https://files.pythonhosted.org/packages/db/04/ee015654c91028e5d8ca064806438b3bd0afbf3805a58b87d9f8630e91c7/frepr-0.1.1-cp34-cp34m-win32.whl" }, { "comment_text": "", "digests": { "md5": "70dd121dbec4aa5d1c819fa2f76285ae", "sha256": "a0bc461ceb128f072f59b2363a8f3df263664f40c7752029babdb2dd4dc1963f" }, "downloads": -1, "filename": "frepr-0.1.1-cp34-cp34m-win_amd64.whl", "has_sig": false, "md5_digest": "70dd121dbec4aa5d1c819fa2f76285ae", "packagetype": "bdist_wheel", "python_version": "cp34", "requires_python": null, "size": 31452, "upload_time": "2017-02-20T00:03:45", "url": "https://files.pythonhosted.org/packages/68/27/99100364d1f99ccd9d04e6147ec9b19ebb58ba976fa49d8f3061549b6554/frepr-0.1.1-cp34-cp34m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "3ece0e7e1ca4c8be9eb833da1cce5998", "sha256": "c84a066df6bee5df4f920c3d7817cb1bf94fdf262b6b828325fc7f61fd9c3872" }, "downloads": -1, "filename": "frepr-0.1.1-cp35-cp35m-win32.whl", "has_sig": false, "md5_digest": "3ece0e7e1ca4c8be9eb833da1cce5998", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 20803, "upload_time": "2017-02-20T00:03:47", "url": "https://files.pythonhosted.org/packages/3f/4f/58a281854b6adde87829610947e49190271e8617d3d2120847636a7f1804/frepr-0.1.1-cp35-cp35m-win32.whl" }, { "comment_text": "", "digests": { "md5": "cb08d66faf9001a291a039afdc0dae48", "sha256": "69a027a4605a8a5a4123cc91ad6f4d858d797116d20f604553df641cf53a469f" }, "downloads": -1, "filename": "frepr-0.1.1-cp35-cp35m-win_amd64.whl", "has_sig": false, "md5_digest": "cb08d66faf9001a291a039afdc0dae48", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 25126, "upload_time": "2017-02-20T00:03:50", "url": "https://files.pythonhosted.org/packages/6e/3a/abd2a0e15a986e307d0d9b65ec167249792e47e5bf9f90522d33d63e7f30/frepr-0.1.1-cp35-cp35m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "5c93b6cd5fbe3a37924b466e1e91dae0", "sha256": "466b4284b1e952c3e81c17208f709f2fbc1723b9a5deb9a9acbfeb90f4e86c35" }, "downloads": -1, "filename": "frepr-0.1.1-cp36-cp36m-win32.whl", "has_sig": false, "md5_digest": "5c93b6cd5fbe3a37924b466e1e91dae0", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 20801, "upload_time": "2017-02-20T00:03:52", "url": "https://files.pythonhosted.org/packages/43/fa/ef937630bdb23aa295d4fc688bf15fccc51a47b19b29b54dbe0bdeb35e44/frepr-0.1.1-cp36-cp36m-win32.whl" }, { "comment_text": "", "digests": { "md5": "94c7d1a82d3f1d7a660b4e0b7ba2471a", "sha256": "c7735e6a22fff426aaa28c274986de0eddfc7e3599aca42af9fd6095f50ad77d" }, "downloads": -1, "filename": "frepr-0.1.1-cp36-cp36m-win_amd64.whl", "has_sig": false, "md5_digest": "94c7d1a82d3f1d7a660b4e0b7ba2471a", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 25125, "upload_time": "2017-02-20T00:03:54", "url": "https://files.pythonhosted.org/packages/c3/d3/e3b048ae321334ab83046f198e7ec7bcea04c3652562d2929a4310e2bd95/frepr-0.1.1-cp36-cp36m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "c58c816901905f0627c3ac56cc0ac634", "sha256": "c87f9a996b7767a887a4b1590b1ab6cbe33825e3793b505cc07f172152b294b4" }, "downloads": -1, "filename": "frepr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c58c816901905f0627c3ac56cc0ac634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58197, "upload_time": "2017-02-20T00:03:56", "url": "https://files.pythonhosted.org/packages/71/6b/d9f3514a2a10b628b485f4b3a99119e70a7c99c748f03e9443e87e3cb39d/frepr-0.1.1.tar.gz" } ] }