{ "info": { "author": "benjiyamin, see AUTHORS.md", "author_email": "benjiyamin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "# Project Overview\n\nPySize is a simple lightweight tool for converting quantities between defined units.\n\n# Installation\n\nInstalling the easy way, using pip:\n\n $ pip install pysize\n\n# Basic Usage\n\nWith PySize it's easy to calculate a conversion from one unit to another.\n\n >>> from pysize import convert\n \n >>> a = convert(1.0).frm('m').to('mm')\n >>> print(a)\n 1000.0\n\nThe conversion functionality even works with NumPy arrays.\n\n >>> a = numpy.array([[1.0, 2.0], [3.0, 4.0]])\n >>> print(a)\n [[ 1. 2.]\n [ 3. 4.]]\n >>> b = convert(a).frm('m').to('mm')\n >>> print(b)\n [[ 1000. 2000.]\n [ 3000. 4000.]]\n\nOne can also convert units combined with multiplication and/or division.\n\n >>> a = 60.0 # In miles per hour\n >>> b = convert(a).frm('mi/h').to('ft/s') # Coverts to feet per second\n >>> print(b)\n 88.0\n\nExponents are parsed and applied correctly.\n\n >>> a = 10.0 # cubic yards\n >>> b = convert(a).frm('yd^3').to('ft^3') # Coverts to cubic feet\n >>> print(b)\n 270.0\n\nTo view a list valid conversions from a unit, use the `options` function.\n\n >>> opts = options('mm')\n >>> print(opts)\n ['km', 'm', 'dm', 'cm', 'mm']\n\nOptions can also be shown after defining the 'from' unit.\n\n >>> opts = convert(1.0).frm('mm').options()\n >>> print(opts)\n ['km', 'm', 'dm', 'cm', 'mm']\n\n# Contributing\n\nFor developers, it's important to use common best practices when contributing to the project.\n[PEP 8](https://www.python.org/dev/peps/pep-0008/) should always be adhered. Code should be\ndocumented with [Google style docstrings](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).\nPull requests and filing issues are encouraged.\n\nTo start contributing with the PySize repository:\n\n1. Fork it!\n\n2. Create a local clone of your fork.\n \n $ git clone https://github.com/YOUR-USERNAME/pysize\n Cloning into `pysize`...\n remote: Counting objects: 10, done.\n remote: Compressing objects: 100% (8/8), done.\n remove: Total 10 (delta 1), reused 10 (delta 1)\n Unpacking objects: 100% (10/10), done.\n\n3. Set up a clean working environment, using virtualenv.\n\n $ virtualenv -p python3 venv\n $ source venv/bin/activate\n $ pip install -r requirements.txt\n\n4. Add the original as a remote repository named `upstream`.\n\n $ git remote add upstream https://github.com/benjiyamin/pysize.git\n $ git remote -v\n origin https://github.com/YOUR-USERNAME/pysize.git (fetch)\n origin https://github.com/YOUR-USERNAME/pysize.git (push)\n upstream https://github.com/benjiyamin/pysize.git (fetch)\n upstream https://github.com/benjiyamin/pysize.git (push)\n\n5. Fetch the current upstream repository branches and commits.\n\n $ git fetch upstream\n remote: Counting objects: 75, done.\n remote: Compressing objects: 100% (53/53), done.\n remote: Total 62 (delta 27), reused 44 (delta 9)\n Unpacking objects: 100% (62/62), done.\n From https://github.com/benjiyamin/pysize\n * [new branch] master -> upstream/master\n\n6. Checkout your local `master` branch and sync `upstream/master` to it, without losing local changes.\n\n $ git checkout master\n Switched to branch 'master'\n \n $ git merge upstream/master\n\n7. Commit your local changes and push to `upstream/master`.\n\n $ git commit -m 'Add some feature'\n $ git push upstream master\n\n8. Submit a pull request. =)\n\nFor a list of contributors who have participated in this project, check out [AUTHORS](AUTHORS.md).\n\n# Testing\n\nUnit Testing is currently done using the built-in unittest module:\n\n $ python tests.py\n\n# License\n\nThis project is licensed under GPL 3.0 - see [LICENSE](LICENSE.md) for details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://benjiyamin.github.io/pysize", "keywords": "units measurement conversion size", "license": "GNU General Public License v3 (GPLv3), see LICENSE.md", "maintainer": null, "maintainer_email": null, "name": "pysize", "package_url": "https://pypi.org/project/pysize/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pysize/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://benjiyamin.github.io/pysize" }, "release_url": "https://pypi.org/project/pysize/0.1/", "requires_dist": null, "requires_python": null, "summary": "PySize is a lightweight tool for converting quantities between defined units", "version": "0.1" }, "last_serial": 2418312, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a072d14c565aa2b52daae8638d4a7eb0", "sha256": "26dbd5e744364f9cc965c86fa6154954d6e9013ead2dc2d11d795f5c21d4bbe3" }, "downloads": -1, "filename": "pysize-0.1.tar.gz", "has_sig": false, "md5_digest": "a072d14c565aa2b52daae8638d4a7eb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4286, "upload_time": "2016-10-23T14:10:29", "url": "https://files.pythonhosted.org/packages/bf/18/d05e43a0aed9a7836ee6c054dac7f9fd6a3b163c08eafbcb30122996f4f7/pysize-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a072d14c565aa2b52daae8638d4a7eb0", "sha256": "26dbd5e744364f9cc965c86fa6154954d6e9013ead2dc2d11d795f5c21d4bbe3" }, "downloads": -1, "filename": "pysize-0.1.tar.gz", "has_sig": false, "md5_digest": "a072d14c565aa2b52daae8638d4a7eb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4286, "upload_time": "2016-10-23T14:10:29", "url": "https://files.pythonhosted.org/packages/bf/18/d05e43a0aed9a7836ee6c054dac7f9fd6a3b163c08eafbcb30122996f4f7/pysize-0.1.tar.gz" } ] }