Skip to main content

AEID: Abjad Encoded ID

Consonant-only encoding for 128-bit identifiers (ULID/UUID), designed for LLM contexts.

AEID encodes 128-bit values as 32-character ASCII strings using only 16 consonant letters (B C D F G H K L M N P R S T V W). No vowels means no accidental English words, eliminating semantic bias when LLMs handle IDs.

ULID:  01KC9R38FJH1XRVWJZBJRRCV5A
AEID:  BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP

Why?

Problem AEID Solution
LLMs hallucinate ID characters 32-char redundancy enables LCS-based error recovery
Alphanumeric IDs form English words Vowel-free alphabet makes word formation impossible
Non-Latin scripts destabilize LLM output ASCII-only, no language switching
Rare characters waste tokens All 256 byte-pairs are single BPE tokens

Install

pip install aeid                # core
pip install aeid[pydantic]      # + Pydantic support

Usage

AEID class (extends ULID)

from aeid import AEID

# Generate
a = AEID()                                          # new with current timestamp
a = AEID.from_str("BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP")  # from AEID string
a = AEID.from_str("01KC9R38FJH1XRVWJZBJRRCV5A")        # from ULID string

# Convert
str(a)          # "BCNRCFMC..."   AEID (32 chars)
a.ulid_str      # "01KC9R38..."   ULID (26 chars)
a.datetime      # datetime(...)   timestamp
a.to_uuid()     # UUID(...)
int(a)          # 128-bit integer

# All ULID factory methods work
AEID.from_datetime(dt)
AEID.from_timestamp(time.time())
AEID.from_uuid(uuid_obj)
AEID.from_int(value)
AEID.parse(any_format)           # auto-detect AEID/ULID/hex/bytes/int

Low-level functions

from aeid import encode, decode, resolve

encode(0x019b1381a1f2887b8df25f5cb1866caa)
# "BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP"

decode("BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP")
# 0x019b1381a1f2887b8df25f5cb1866caa

# LCS-based error recovery
resolve(corrupted_id, candidate_list)

Pydantic

from pydantic import BaseModel
from aeid import AEID

class Record(BaseModel):
    id: AEID

r = Record(id="BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP")  # validates AEID
r = Record(id="01KC9R38FJH1XRVWJZBJRRCV5A")         # validates ULID too
r.model_dump_json()  # {"id": "BCNRCFMCPCWDMMLRMTWDHWHSRCMKKSPP"}

Encoding

Each byte is mapped to a 2-character pair using a 256-entry lookup table:

byte value  ->  ALPHABET[high nibble] + ALPHABET[low nibble]
0x00 -> BB,  0x01 -> BC,  ...  0xFF -> WW

16 bytes (128 bits) produce 32 characters. The encoding preserves sort order: lexicographic order of AEID strings matches the numeric order of the underlying values.

Specification

License

MIT

Metadata

Release files for aeid 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aeid 0.1.0
File Size Uploaded Provenance
aeid-0.1.0.tar.gz 30.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aeid 0.1.0
File Interpreter ABI Platform
aeid-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.0 kB

Release files / aeid-0.1.0.tar.gz

Download URL aeid-0.1.0.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ecf63962cd3bb73736674daeb4a61140e7c1ecc330e8a5d5652ed7e7decaa8bc
BLAKE2b-256 checksum
How to use checksums
ec91e514664f5c334f78aae4f8b211792ff0aff5a3db4ceae23637c0aab39a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / aeid-0.1.0-py3-none-any.whl

Download URL aeid-0.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eda4acd78054414c3fd9bdfc9748322fc43c16b1643816de0c8837ff2a8f72de
BLAKE2b-256 checksum
How to use checksums
862fd293709a25b91375a4acfc316721b5b61521f3e2bac5f74753962d2896cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for aeid 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page