{ "info": { "author": "Spencer Christiansen", "author_email": "jc.spencer92@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# README\n\nTo install, just:\n\n```bash\n$ easy_install unties\n```\n\nor\n\n```bash\n$ pip install unties\n```\n\n### What is this repository for?\n\n* Another units-handling package\n\n### How do I get set up?\n\n* See install directions above\n* No configuration options\n* No dependencies\n* To run tests: `python setup.py test`\n\n### Examples\n\nTo use, import the Units class. I like to shorthand it as `_`, after the style\nof TI calculators:\n\n```python\n>>> import unties as _\n```\n\nOr, especially if you're just playing in a python console, feel free to wildcard\nimport everything:\n\n```python\n>>> from unties import *\n```\n\nAnd you instantly have access to a ton of units and constants\n\nConvert 11.5 'ft' to 'inch'\n\n```python\n>>> 11.5 * ft.units_of(inch)\n138.00000000000003 * inch\n```\n\nAs you can see from the examples, floating-point math is hard\n\nYou can call units with another unit as the argument as shorthand for\nconversion. So you can do:\n\n```python\n>>> 11.5 * ft(inch)\n138.00000000000003 * inch\n```\n\nConversion will *not* raise an error if the units groups have different\ndimensions; instead, basic units will be used to make up the difference, without\naffecting the value:\n\n```python\n>>> mph(inch)\n17.6 * inch / s\n\n>>> hp(cal)\n178.1073544430114 * cal / s\n\n>>> acre(ft)\n43559.99999999999 * ft**2\n```\n\nMultiple units should be grouped:\n\n```python\n>>> (yd / hr)(mm / s)\n0.254 * mm / s\n```\n\nor else strange things happen:\n\n```python\n>>> yd / hr(mm / s)\n2.7777777777777776e-07 * m * yd / (mm * s)\n```\n\nPlease note, though, that conversion never changes the value of a measurement.\nIn the previous example, `2.7777777777777776e-07 * m * yd / (mm * s) == yd / hr`\n\nIf you're ever unsure what a unit symbol represents, just type it into the\nconsole, and the unit's name and quantity will be shown:\n\n```python\n>>> print(amu)\n1.0 * amu # Atomic mass unit [mass]\n```\n\nIf you've done some calculations and want to check what quantity your new unit\ngroup measures, use the `quantity()` method:\n\n```python\n>>> (3 * hp / mmHg).quantity()\n'volumetric flow'\n```\n\n### Contribution guidelines\n\n* Contributions are welcome. Just make a pull request.\n* Use [pep8](https://pypi.python.org/pypi/pep8) to lint your Python code.\n* Write new tests for any new features\n\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Spencer Christiansen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nAll Authors and Contributors:\n\nSpencer Christiansen", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/spejamchr/unties", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "unties", "package_url": "https://pypi.org/project/unties/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/unties/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/spejamchr/unties" }, "release_url": "https://pypi.org/project/unties/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "The unit handler", "version": "0.3.0" }, "last_serial": 2396000, "releases": { "0.1": [], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2612515d768b31e696a92d893be9014c", "sha256": "b6f775cf1b3bdba909348f7e9d8c1758c320847cc848bf0d3078ae94b89ac900" }, "downloads": -1, "filename": "unties-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2612515d768b31e696a92d893be9014c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13184, "upload_time": "2016-06-29T01:37:34", "url": "https://files.pythonhosted.org/packages/50/e0/109bb19ba9e969c13e9bff3d31c0d2fd9227eba6870ee51b5cb7e5a4f149/unties-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d29b9ccc8351377c76037bddf1f21ab8", "sha256": "6a4120aa2d843f7f4939576739289b0fb6135f7e3541415da79d6c73cbc14fd2" }, "downloads": -1, "filename": "unties-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d29b9ccc8351377c76037bddf1f21ab8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22414, "upload_time": "2016-10-12T20:10:20", "url": "https://files.pythonhosted.org/packages/32/41/a3a19f76fa994ac3029378bb2905dfbebbaf8bb73fff71047796645d0f91/unties-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d29b9ccc8351377c76037bddf1f21ab8", "sha256": "6a4120aa2d843f7f4939576739289b0fb6135f7e3541415da79d6c73cbc14fd2" }, "downloads": -1, "filename": "unties-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d29b9ccc8351377c76037bddf1f21ab8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22414, "upload_time": "2016-10-12T20:10:20", "url": "https://files.pythonhosted.org/packages/32/41/a3a19f76fa994ac3029378bb2905dfbebbaf8bb73fff71047796645d0f91/unties-0.3.0.tar.gz" } ] }