basewhat
A Python utility for encoding/decoding arbitrary-base numbers.
Project home page: https://gitlab.com/paul_bissex/basewhat
Author: Paul Bissex paul@bissex.net
License: MIT
Usage
>>> b16 = BaseWhat(base=16)
>>> b16.from_int(65535)
'FFFF'
>>> b16.to_int('DECAFBAD')
3737844653
>>> b32 = BaseWhat(digits="23456789ABCDEFGHJKLMNPQRSTUVWXYZ")
>>> b32.from_int(32767)
'ZZZ'
>>> b32.from_int(9223372036854775808)
'A222222222222'
>>> b32.to_int('1900MIXALOT')
Traceback (most recent call last):
...
ValueError: Not a valid base 32 number
Metadata
Release files for basewhat 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basewhat-1.1.1.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basewhat-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / basewhat-1.1.1.tar.gz
| Download URL | basewhat-1.1.1.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42523370d177b7e269cfa7bf63274528d72339e0927c477039afb304b3b94385
|
|
BLAKE2b-256 checksum How to use checksums |
cbc4d86a2e094bac4822a6ce8a71c577afef210a8e16875166b15badf5ddfcad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Darwin/24.4.0
|
Release files / basewhat-1.1.1-py3-none-any.whl
| Download URL | basewhat-1.1.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0536b1701900cdd87f362c41fdbb4f469192f2a225014109269bff37a4939d5e
|
|
BLAKE2b-256 checksum How to use checksums |
7a301fce8ae71dc1fec02043ef3a98793828fafea6446ff4aeedf5ab7e8c67d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Darwin/24.4.0
|