bases.py-0.2.2
توضیحات
A python port for https://github.com/aseemk/bases.js
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bases.py-0.2.2 |
| نام | bases.py |
| نسخه کتابخانه | 0.2.2 |
| نگهدارنده | ['Sorch'] |
| ایمیل نگهدارنده | [] |
| نویسنده | Belldandu |
| ایمیل نویسنده | Kami@ilp.moe |
| آدرس صفحه اصلی | https://github.com/belldandu/bases.py |
| آدرس اینترنتی | https://pypi.org/project/bases.py/ |
| مجوز | MIT license (http://belldandu.mit-license.org/). (c) 2015 Belldandu and contributors (https://github.com/belldandu/bases.py/graphs/contributors). The MIT License (MIT) Copyright © 2015-2016 Belldandu, http://ilp.moe <kami@ilp.moe> 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. |
Utility for converting numbers to/from different bases/alphabets. Common bases have convenience aliases (see https://github.com/belldandu/bases.py#usage && https://github.com/belldandu/bases.py#api), but arbitrary/custom alphabets can be used.
As most people have noticed pythons int() only supports one way base conversions.
e.g.( int('lol',36) # 28101 ). Pythons format() also only supports conversion the other way up to base 16. This library was created to help those python programmers by providing a bases conversion system that works both ways, can use customized conversions and supports from base 2 all the way up to base 64 all in one library.
نحوه نصب
نصب پکیج whl bases.py-0.2.2:
pip install bases.py-0.2.2.whl
نصب پکیج tar.gz bases.py-0.2.2:
pip install bases.py-0.2.2.tar.gz