Universal base converter
Use either with predefined converters:
- integer to base32(RFC4648)
- integer to hex
- base32(RFC4648) to integer
Or use with custom settings:
- set base
- set charset
Examples:
if __name__ == "__main__":
# example:
num = 15851
# using instance of converter, using custom settings
converter = Convertbase()
converter.set_base(32)
converter.set_charset('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567')
print(converter.convert(num))
# or using static methods:
print(Convertbase.to_b32(num))
# hex, compare to built-in
print(Convertbase.to_hex(num))
print(hex(num))
#convert back:
print(Convertbase.from_b32_to_dec('PPL'))
Metadata
Release files for convertbase 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| convertbase-0.1.3.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| convertbase-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / convertbase-0.1.3.tar.gz
| Download URL | convertbase-0.1.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ea2a2e9d34c13710ff98907ef84e4fef45c20c3ea95ac47ee1905059269395d
|
|
BLAKE2b-256 checksum How to use checksums |
eea1f26a2f9db356569506f51c49782a5c89d2b4a60932cb3f75d2be2c81e66a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
|
Release files / convertbase-0.1.3-py3-none-any.whl
| Download URL | convertbase-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b165833ad3dfa5fb212fbdb0102656e0bf0bc106f42d244bb98fbf12d71f720c
|
|
BLAKE2b-256 checksum How to use checksums |
7de0bbbd7443a874af641104322ffbbfd028e41bfea2847aca8070a7d65919ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
|