{ "info": { "author": "Samira El Aabidi", "author_email": "sam.elaabidi@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# pybaseconv\n\n[![Build Status](https://travis-ci.com/El-Sam/pybaseconv.svg?branch=master)](https://travis-ci.com/El-Sam/pybaseconv)\n\n**pybaseconv** is a library that allows you to convert any large number (no fractions) from any base to any other base, thus freedom to choose source and/or destination bases.\n\nThere are 5 predefined bases that are supported by **pybaseconv**, which are:\n\n* `DEC` : the decimal base `\"0123456789\"`.\n* `BIN` : the binary base `\"01\"`.\n* `OCT` : the octal base `\"01234567\"`.\n* `HEX` : the hexadecimal base `\"0123456789abcdef\"`.\n* `FLICKER_BASE_58` & `BITCOIN_BASE_58`: two variations of the **Base58** encoding, more info [here](https://en.wikipedia.org/wiki/Base58).\n\n## Module usage\n\n```python\nfrom pybaseconv import Converter, BASE\n\ndec2hex_converter = Converter(BASE.DEC, BASE.HEX)\nprint(dec2hex_converter.convert('738653')) # returns b455d\n\ndec2bitcoin_converter = Converter(BASE.DEC, BASE.BITCOIN_BASE_58)\nprint(dec2bitcoin_converter.convert('292251')) # returns 2Vsp\n\ndec2custom_base_converter = Converter(BASE.DEC, '*&@#$')\nprint(dec2custom_base_converter.convert('539')) # returns $&@$\n\nbin2dec_converter = Converter(BASE.BIN, BASE.DEC)\nprint(bin2dec_converter.convert('11112')) # raises exception because 11112 is not a binary number\n\n```\n\n*PS*: when using custom bases, make sure that the digits are sorted from smallest to the largest, in order to get the appropriate conversion.\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": "", "keywords": "Python,Base conversion", "license": "", "maintainer": "", "maintainer_email": "", "name": "pybaseconv", "package_url": "https://pypi.org/project/pybaseconv/", "platform": "", "project_url": "https://pypi.org/project/pybaseconv/", "project_urls": null, "release_url": "https://pypi.org/project/pybaseconv/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "This library allows you to convert a number from any base to any base", "version": "0.0.1" }, "last_serial": 3896272, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "72725e4ca5519c3f269944a606cfe7e6", "sha256": "f43d091a0daea598e529a5229a533437d9467c060f606536afd9008554e98272" }, "downloads": -1, "filename": "pybaseconv-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "72725e4ca5519c3f269944a606cfe7e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4304, "upload_time": "2018-05-24T18:44:20", "url": "https://files.pythonhosted.org/packages/7a/6c/ca6c4552dda0701231b415222c81685539d42ca53a03a2180e3ef381f5de/pybaseconv-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a679f7721b21b648f635ef9fb02e4aa6", "sha256": "ffecff865721fa3abb37852bab3447958570b8f1de54311061dd5735762e8b94" }, "downloads": -1, "filename": "pybaseconv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a679f7721b21b648f635ef9fb02e4aa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3579, "upload_time": "2018-05-24T18:44:22", "url": "https://files.pythonhosted.org/packages/60/7a/510087c99ce714ac5ac03a9b8e3baeca421a73be9bf5d46f4d6a932216d5/pybaseconv-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72725e4ca5519c3f269944a606cfe7e6", "sha256": "f43d091a0daea598e529a5229a533437d9467c060f606536afd9008554e98272" }, "downloads": -1, "filename": "pybaseconv-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "72725e4ca5519c3f269944a606cfe7e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4304, "upload_time": "2018-05-24T18:44:20", "url": "https://files.pythonhosted.org/packages/7a/6c/ca6c4552dda0701231b415222c81685539d42ca53a03a2180e3ef381f5de/pybaseconv-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a679f7721b21b648f635ef9fb02e4aa6", "sha256": "ffecff865721fa3abb37852bab3447958570b8f1de54311061dd5735762e8b94" }, "downloads": -1, "filename": "pybaseconv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a679f7721b21b648f635ef9fb02e4aa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3579, "upload_time": "2018-05-24T18:44:22", "url": "https://files.pythonhosted.org/packages/60/7a/510087c99ce714ac5ac03a9b8e3baeca421a73be9bf5d46f4d6a932216d5/pybaseconv-0.0.1.tar.gz" } ] }