Name | radixhopper JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | A Python library for efficient radix-based number system conversions, specializing in cyclic fractions handling, for bases 2 through 36. |
upload_time | 2025-08-01 18:05:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2024-present Aarmn the limitless <aarmn80@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
bases
conversion
cyclic fractions
math
mathematics
number system
radix
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ✨ RadixHopper ✨
[](https://pypi.org/project/radixhopper)
[](https://pypi.org/project/radixhopper)
-----
🌟 Hop between number bases with ease! 🌟
RadixHopper is a python library and terminal utility for flexible numerical radix (a.k.a base) conversions, specializing in cyclic fractions handling, for arbitrary bases with arbitrary digits, with sane default and crazy levels of customization.
## ✨ Features
- 🔢 Convert numbers between radices 2 to 36 out-of-the-box, and more with custom digits!
- 🧑🔬 Support for scientific notation
- 🦅 Arbitrary precision operations, by leveraging fractions
- 🖥️ Support for `0x`, `0o` and `0b` format
- 🔄 Handle cyclic fractions with grace
- 🚀 Fast evaluations with conversion buffering
- 📓 Jupyter notebook support
- 🎨 Intuitive CLI interface
- 🌈 And alot more...
## 🌠 Installation
Sprinkle some magic into your Python environment:
```sh
pip install radixhopper
```
## 🎭 Usage
### As a library
```python
from radixhopper import RadixNumber
# Create a RadixNumber instance from a string in base 10
num = RadixNumber("3.14", base=10)
# Convert it to base 2
result = num.to(base=2)
# Print the representation in base 2
print(f"{result!r}") # or simply `>>> result` or print(repr(result))
# >>> RadixNumber(number=11.0[01000111101011100001], representation_base=2, digits=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ, case_sensitive=False, fraction=(157/50))
# Access the string representation directly
print(result)
# >>> 11.0[01000111101011100001]
# Perform operations
num2 = RadixNumber("1.1", base=2) # Represents 1.5 in base 10
sum_result = num + num2 # Operations default to Fraction representation
print(sum_result) # >>> 100.[10100011110101110000]
print(sum_result.to(base=10)) # >>> 4.64
```
### CLI
```sh
radixhopper 3.14 --from 10 --to 2
```
or simply
```sh
radixhopper 3.14 10 2
```
## 🌟 Contributing
We welcome contributions! Please check our [Issues](https://github.com/aarmn/radixhopper/issues) page for open tasks or suggest new features.
## 📜 License
`radixhopper` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
## 🌠 Star Gazing
```
* . . * * . . . * ..
. * . ✨ . . * . *
*. * . . * . * . . *
. . * . ✨ . . . .
. *. . . * . * . . *
* . . . . . . . .
. . . ✨ * . . * *
. * * . . * . * . .
. . . . . .
* . . * . * . . *
```
Happy hopping! ✨🐰✨
Raw data
{
"_id": null,
"home_page": null,
"name": "radixhopper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "bases, conversion, cyclic fractions, math, mathematics, number system, radix",
"author": null,
"author_email": "aarmn <aarmn80@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7f/f0/b808c39dd0a226848a4878da7d61b39f45d317e0fe9e723f8d7b4c62a6ff/radixhopper-1.0.0.tar.gz",
"platform": null,
"description": "# \u2728 RadixHopper \u2728\n\n[](https://pypi.org/project/radixhopper)\n[](https://pypi.org/project/radixhopper)\n\n-----\n\n\ud83c\udf1f Hop between number bases with ease! \ud83c\udf1f\n\nRadixHopper is a python library and terminal utility for flexible numerical radix (a.k.a base) conversions, specializing in cyclic fractions handling, for arbitrary bases with arbitrary digits, with sane default and crazy levels of customization.\n\n## \u2728 Features\n\n- \ud83d\udd22 Convert numbers between radices 2 to 36 out-of-the-box, and more with custom digits!\n- \ud83e\uddd1\u200d\ud83d\udd2c Support for scientific notation\n- \ud83e\udd85 Arbitrary precision operations, by leveraging fractions\n- \ud83d\udda5\ufe0f Support for `0x`, `0o` and `0b` format\n- \ud83d\udd04 Handle cyclic fractions with grace\n- \ud83d\ude80 Fast evaluations with conversion buffering\n- \ud83d\udcd3 Jupyter notebook support\n- \ud83c\udfa8 Intuitive CLI interface\n- \ud83c\udf08 And alot more...\n\n## \ud83c\udf20 Installation\n\nSprinkle some magic into your Python environment:\n\n```sh\npip install radixhopper\n```\n\n## \ud83c\udfad Usage\n\n### As a library\n\n```python\nfrom radixhopper import RadixNumber\n\n# Create a RadixNumber instance from a string in base 10\nnum = RadixNumber(\"3.14\", base=10)\n\n# Convert it to base 2\nresult = num.to(base=2)\n\n# Print the representation in base 2\nprint(f\"{result!r}\") # or simply `>>> result` or print(repr(result))\n# >>> RadixNumber(number=11.0[01000111101011100001], representation_base=2, digits=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ, case_sensitive=False, fraction=(157/50))\n\n# Access the string representation directly\nprint(result)\n# >>> 11.0[01000111101011100001]\n\n# Perform operations\nnum2 = RadixNumber(\"1.1\", base=2) # Represents 1.5 in base 10\nsum_result = num + num2 # Operations default to Fraction representation\nprint(sum_result) # >>> 100.[10100011110101110000]\nprint(sum_result.to(base=10)) # >>> 4.64\n```\n\n### CLI\n\n```sh\nradixhopper 3.14 --from 10 --to 2\n```\n\nor simply\n\n```sh\nradixhopper 3.14 10 2\n```\n\n## \ud83c\udf1f Contributing\n\nWe welcome contributions! Please check our [Issues](https://github.com/aarmn/radixhopper/issues) page for open tasks or suggest new features.\n\n## \ud83d\udcdc License\n\n`radixhopper` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n\n## \ud83c\udf20 Star Gazing\n\n```\n * . . * * . . . * ..\n . * . \u2728 . . * . *\n *. * . . * . * . . *\n . . * . \u2728 . . . .\n . *. . . * . * . . *\n * . . . . . . . .\n . . . \u2728 * . . * *\n . * * . . * . * . .\n . . . . . .\n * . . * . * . . *\n```\n\nHappy hopping! \u2728\ud83d\udc30\u2728\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024-present Aarmn the limitless <aarmn80@gmail.com>\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A Python library for efficient radix-based number system conversions, specializing in cyclic fractions handling, for bases 2 through 36.",
"version": "1.0.0",
"project_urls": {
"Documentation": "https://github.com/aarmn/radixhopper#readme",
"Issues": "https://github.com/aarmn/radixhopper/issues",
"Source": "https://github.com/aarmn/radixhopper"
},
"split_keywords": [
"bases",
" conversion",
" cyclic fractions",
" math",
" mathematics",
" number system",
" radix"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c42e6527a4020987dadad09ccf7db193d0a007a0a04991eeb8af9936b4d3b6c2",
"md5": "356822fa0e580e38e6b48e9b7d54ae53",
"sha256": "845582a581b66ce39a910de460653c101f9ff15896c6e7aaf09774628c6fa963"
},
"downloads": -1,
"filename": "radixhopper-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "356822fa0e580e38e6b48e9b7d54ae53",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17551,
"upload_time": "2025-08-01T18:05:49",
"upload_time_iso_8601": "2025-08-01T18:05:49.493829Z",
"url": "https://files.pythonhosted.org/packages/c4/2e/6527a4020987dadad09ccf7db193d0a007a0a04991eeb8af9936b4d3b6c2/radixhopper-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7ff0b808c39dd0a226848a4878da7d61b39f45d317e0fe9e723f8d7b4c62a6ff",
"md5": "02e8d6696301042a4f55aae9dfad8869",
"sha256": "81202a7cf6c14788fb7549f3dec2aa60078595a0825ff0a75dcaee13b84881f2"
},
"downloads": -1,
"filename": "radixhopper-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "02e8d6696301042a4f55aae9dfad8869",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 91942,
"upload_time": "2025-08-01T18:05:50",
"upload_time_iso_8601": "2025-08-01T18:05:50.993005Z",
"url": "https://files.pythonhosted.org/packages/7f/f0/b808c39dd0a226848a4878da7d61b39f45d317e0fe9e723f8d7b4c62a6ff/radixhopper-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-01 18:05:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aarmn",
"github_project": "radixhopper#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "radixhopper"
}