akit
Crockford base32: denser than hex, and the alphabet drops I, L, O and U
so nothing gets mistyped when a human reads an ID aloud.
Install
pip install akit
Usage
from akit import decode, encode
encode(b"\x00") # '80'
encode(b"\xff") # 'FZ'
decode("FZ") # b'\xff'
decode("fz") # b'\xff' case insensitive
decode("F-Z") # b'\xff' separators ignored
decode("8O") # b'\x00' O reads as zero
decode("8I") # b'\x01' I and L read as one
Leading zeros
A naive "bytes to integer to base32" conversion silently drops leading zero
bytes, so decode(encode(b"\x00\x01")) would come back one byte short. A
sentinel byte is prepended before conversion and stripped after, which keeps
round trips exact:
decode(encode(b"\x00\x01")) == b"\x00\x01" # True
Why Crockford
| Alphabet | Dropped letters | Safe to dictate |
|---|---|---|
| RFC 4648 base32 | none | no (0/O, 1/I) |
| Crockford | I L O U |
yes |
U is excluded so accidental obscenities cannot appear in generated IDs.
Invalid characters raise ValueError; there is no silent repair.
License
MIT
Metadata
Release files for akit 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| akit-0.0.2.tar.gz | 3.4 kB | Without provenance | Details for akit-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| akit-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for akit-0.0.2-py3-none-any.whl |
Total release size: 7.2 kB
Release files / akit-0.0.2.tar.gz
| Download URL | akit-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adfd0b3acbdcec98e9758dcf8b68e46e7878ca023ead0bea1c255cf6b8c8e95b
|
|
BLAKE2b-256 checksum How to use checksums |
a250ec0681293012dd282bb5c15892416d3d60ffb2ac646fafff9eb9e5cf6004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / akit-0.0.2-py3-none-any.whl
| Download URL | akit-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ceec760f1b0cd375de3ab9015da73eac02d89f9615f87082d4b7f1f3b0213426
|
|
BLAKE2b-256 checksum How to use checksums |
ca8c91e8d15b95f129c82e57df4dbe470187e2792779fd4a758ec0f0d3b01b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for akit 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.