{ "info": { "author": "Jason R. Jones", "author_email": "slightlynybbled@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "![Travis CI Build Status](https://travis-ci.org/slightlynybbled/engineering_notation.svg?branch=master)\n\n# Purpose\n\nTo easily work with human-readable engineering notation. I wrote this as a quick tool for my own use.\nI found that I was writing the same functionality into multiple packages and would like a quick pip-installable\npackage to take care of this manipulation for me. The package should be easily extended for other use cases.\nThe package is unit-less, so only operates on numeric values. Unit detection may be added in future versions.\n\nMore information may be found at [for(embed)](http://forembed.com/engineering-notation-in-python.html).\n\n# Installation\n\nInstall using pip: `pip install engineering_notation`.\n\n# Status and Contributions\n\nThis project currently has 100% test coverage. Have a look in `test.py` for examples of how to use\nthis library. To execute the tests, run `pytest` from the main directory or, \nin some environments, it may be necessary to run `python3 -m pytest`.\n\nAny contributions must pass 100% of current tests and pass flake8. To execute\nflake8, navigate to the project directory and `python3 setup.py flake8`.\n\nYour pull request will automatically be run through testing and flake8 checks and\nany pull requests that do not pass these will be put on hold pending passing.\n\n# Use \n\nThere are multiple ways of initializing a number to a particular value, but a string is the preferred method:\n\n```\n>>> from engineering_notation import EngNumber\n>>> EngNumber('10k')\n10k\n>>> EngNumber('10000')\n10k\n>>> EngNumber(10000)\n10k\n>>> EngNumber(10000.0)\n10k\n>>> EngNumber(1e4)\n10k\n```\n\nWhere decimals are involved, we use a default precision of 2 digits:\n\n```\n>>> EngNumber('4.99k')\n4.99k\n>>> EngNumber('4.9k')\n4.90k\n```\n\nThis behavior can truncate your results in some cases, and cause your number to round. To specify more or less\ndigits, simply specify the precision in the declaration:\n\n```\n>>> EngNumber('4.999k')\n5k\n>>> EngNumber('4.999k', precision=3)\n4.999k\n```\n\nMost operations that you would perform on numeric values are valid, although all operations are not implemented:\n\n```\n>>> EngNumber('2.2k') * 2\n4.40k\n>>> 2 * EngNumber('2.2k')\n4.40k\n>>> EngNumber(1.2) > EngNumber('3.3k') \nFalse\n>>> EngNumber(1.2) <= EngNumber('3.3k')\nTrue\n>>> EngNumber('3.3k') == EngNumber(3300)\nTrue\n```\n\nAll of the above operations are also possible on the `EngUnit()` class as well. The only difference is\nthat units must match for addition/subtraction/comparison operations. Although multiplication and division\noperations will work numerically, they may not always be strictly correct. This is because EngUnit is not\nintended to replace a computer algebra system!\n\n```\n>>> EngUnit('2s') / EngUnit('4rotations')\n0.5s/rotations\n```\n\nAdditionally, since there are 'reserved' letters for sizing the number, you must be careful with your units!\n\n```\n>>> EngUnit('2mm')\n2mm # <<< this value equivalent to \"0.002m\"\n>>> EngUnit('2meter')\n2meter # <<< this value is equivalent to \"0.002eter\", the \"m\" was used to scale the unit!\n```\n\n# Contributions\n\nContributions are welcome. Feel free to make feature requests in the issues.\n\n\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/slightlynybbled/engineering_notation", "keywords": "engineering notation decimal", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "engineering-notation", "package_url": "https://pypi.org/project/engineering-notation/", "platform": "", "project_url": "https://pypi.org/project/engineering-notation/", "project_urls": { "Homepage": "https://github.com/slightlynybbled/engineering_notation" }, "release_url": "https://pypi.org/project/engineering-notation/0.6.0/", "requires_dist": null, "requires_python": "", "summary": "Easy engineering notation", "version": "0.6.0" }, "last_serial": 5580781, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e3b355f381913b60df9bdbae18629629", "sha256": "e6a35489381a95eb78064a35d0a3d9174b76f11ea5503b99ddb63983b1a5b0ab" }, "downloads": -1, "filename": "engineering_notation-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e3b355f381913b60df9bdbae18629629", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5597, "upload_time": "2017-05-30T16:10:04", "url": "https://files.pythonhosted.org/packages/56/5c/0443446390d7accec864bcb371dd663f2edc268d5d55b54b10885fa150ef/engineering_notation-0.1.0-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "54a5d093f09ecdc1f5bdb7fc56aa3461", "sha256": "6bb31ee2f56f5046bdd37ae1d0f7deb404a07e39354a83a0e445c793afec8e53" }, "downloads": -1, "filename": "engineering_notation-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "54a5d093f09ecdc1f5bdb7fc56aa3461", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6940, "upload_time": "2017-05-30T19:08:42", "url": "https://files.pythonhosted.org/packages/30/26/ce504427df5ffedd6e96bfcef72227ec10d00a30b8942918455da052dcc9/engineering_notation-0.2.0-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4896549ea57b7c330dd04f18da662580", "sha256": "bbc7c2e54f430e53776767a32dc7eaa432e5cc7b59518270ad46a209127eaf7b" }, "downloads": -1, "filename": "engineering_notation-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4896549ea57b7c330dd04f18da662580", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6778, "upload_time": "2017-05-30T19:12:31", "url": "https://files.pythonhosted.org/packages/3e/ab/5c140857e31cbb89b4c4b0ab9c72f40f94289c31684115686b0c37573f96/engineering_notation-0.2.1-py3-none-any.whl" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ad9140ea12747ff615a3084207ee0c25", "sha256": "e16410af98823a0a8a1c39d64ba4b6a5c5c36b230d8a035093b7cbb1c3999317" }, "downloads": -1, "filename": "engineering_notation-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ad9140ea12747ff615a3084207ee0c25", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4288, "upload_time": "2017-05-30T19:23:25", "url": "https://files.pythonhosted.org/packages/01/33/da10c47f6f280b4563e59bade83b0ffbd7ae9b39055f114455a6b66b2997/engineering_notation-0.2.2-py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "3d853362454e5da3e2098a17d6943147", "sha256": "acc81a6a153881c6fd0ce06e4d2d3c7e4868162895f1c599901343833918664c" }, "downloads": -1, "filename": "engineering_notation-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "3d853362454e5da3e2098a17d6943147", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4290, "upload_time": "2017-05-30T19:40:52", "url": "https://files.pythonhosted.org/packages/f0/d2/9799ce7139ff1d2943f8e3f9185b7a3379789783f103b2bc950b708bfdfb/engineering_notation-0.2.3-py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2b545d35721ef6ac6aa692d1091fb920", "sha256": "f08fbe863c177171cbf8e4a0cf4b38c3036bb66799f5870a619681a92af02cc6" }, "downloads": -1, "filename": "engineering_notation-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b545d35721ef6ac6aa692d1091fb920", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4356, "upload_time": "2017-05-31T12:49:22", "url": "https://files.pythonhosted.org/packages/4d/0d/bb65ac5cc6dc6e9cbedb0fd59fa8df626a6b2dd572c3685a8aab39119760/engineering_notation-0.3.0-py3-none-any.whl" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "b0b591e199e2693ad3b8bcb57e4ef655", "sha256": "50ffb770456dec500cc77ed48b85d975460bfa60b42597668e009c4cf41370d1" }, "downloads": -1, "filename": "engineering_notation-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b0b591e199e2693ad3b8bcb57e4ef655", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4624, "upload_time": "2017-09-24T03:03:16", "url": "https://files.pythonhosted.org/packages/58/b0/5fecc73dd783ca04b9dad2ce88e24711aea22db3e4f413ee493c788c0c5d/engineering_notation-0.3.2-py3-none-any.whl" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "a945c0b08b9d09094f22f4233a2acd6d", "sha256": "bfcb58bff712460ddf21b63b339799a89989f7c510deb823646b7fe06a1e49ce" }, "downloads": -1, "filename": "engineering_notation-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a945c0b08b9d09094f22f4233a2acd6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4629, "upload_time": "2017-09-24T03:27:33", "url": "https://files.pythonhosted.org/packages/bb/4e/8b8be6a129156ed45f281539205960d73bd13cdd6e2d75d5b7d2cbc370de/engineering_notation-0.3.3-py3-none-any.whl" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "cb98acf2a1e120bef274eab31e0d034d", "sha256": "0de5704c1a46318d66f98d28b36f1f5111721a63da6b3d785ad0e4db92d30030" }, "downloads": -1, "filename": "engineering_notation-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cb98acf2a1e120bef274eab31e0d034d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4715, "upload_time": "2017-10-29T03:00:30", "url": "https://files.pythonhosted.org/packages/82/d4/c9a54d8e9eeae6616dda1845e63378a15af16fc3af5f3a277e4e7a60fdad/engineering_notation-0.4.0-py3-none-any.whl" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "2ad9f8ae8107ea5f18e5ffb303a61e0e", "sha256": "950a40463856b19c6ac687f8aa4392b69213d550d7a311ed5c2e4d5062dcc12d" }, "downloads": -1, "filename": "engineering_notation-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2ad9f8ae8107ea5f18e5ffb303a61e0e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7638, "upload_time": "2018-05-01T11:09:26", "url": "https://files.pythonhosted.org/packages/a0/30/c0ae086aa8d17223e13f185e4a1f4e367d2e618023d6d20a0a5195c98754/engineering_notation-0.5.0-py3-none-any.whl" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "13d8903f1deb9efe2e9f8bcfee236052", "sha256": "cb458a31c54016411c62399ece761a22f50064d6deff96181094c28f3ed392c9" }, "downloads": -1, "filename": "engineering_notation-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "13d8903f1deb9efe2e9f8bcfee236052", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5359, "upload_time": "2018-06-13T11:21:18", "url": "https://files.pythonhosted.org/packages/21/1b/5d21849ef984b4c8458c946c4539a469d4307a3881111e87ee9174c15cc0/engineering_notation-0.5.2-py3-none-any.whl" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "5684efec41bc0738bb1fe625a71ffaf7", "sha256": "1ea1e450d575b4804723d0711b0609d2711dffac2f4b5548ee632c16a636d9f6" }, "downloads": -1, "filename": "engineering_notation-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5684efec41bc0738bb1fe625a71ffaf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5665, "upload_time": "2019-07-25T01:59:18", "url": "https://files.pythonhosted.org/packages/d4/c4/4712b8020b8a3ada129581be891e2dbbd6a4cf54195ea2b80f89bbc51756/engineering_notation-0.6.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5684efec41bc0738bb1fe625a71ffaf7", "sha256": "1ea1e450d575b4804723d0711b0609d2711dffac2f4b5548ee632c16a636d9f6" }, "downloads": -1, "filename": "engineering_notation-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5684efec41bc0738bb1fe625a71ffaf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5665, "upload_time": "2019-07-25T01:59:18", "url": "https://files.pythonhosted.org/packages/d4/c4/4712b8020b8a3ada129581be891e2dbbd6a4cf54195ea2b80f89bbc51756/engineering_notation-0.6.0-py3-none-any.whl" } ] }