Skip to main content

Classical-language, human-readable identifiers with >32-bit entropy using Latin and Greek lexemes.

Project description

idio

Classical-language, human-readable identifiers with >32-bit entropy using Latin and Ancient Greek lexemes. Designed for enterprise-grade uniqueness while keeping outputs memorable and ASCII-only.

Why idio?

  • Uses cryptographically secure randomness (secrets.SystemRandom).
  • Exceeds 32 bits of entropy by composing two grammar-conformant segments.
  • Deterministic grammar drawn from AGENT.md: three patterns mixing Latin adjectives/nouns and Greek nouns/modifiers.
  • Pure-Python, zero dependencies.

Installation

pip install idio
# or locally
pip install .

Usage

from idio import generate_identifier, generate_segment, entropy_bits

# Default: two segments to exceed 32 bits, domain-safe with hyphens and dots
identifier = generate_identifier()
print(identifier)  # e.g., "unicus-nomen-onoma.idion-sema-signum"

# Single segment (useful for display, but ~18.9 bits with bundled lists)
segment = generate_segment()

# Entropy budget for your configuration
bits = entropy_bits(segments=2)
print(f"{bits:.2f} bits")

Subdomain-safe format

By default, words are joined with - and segments with . to produce valid DNS labels (e.g., normalis-gradus-kosmos.perfectus-signum-onoma). If you prefer the original underscore format, pass word_separator="_" (and optionally segment_separator="--").

Patterns (all supported)

  • M1: <latin_adjective>-<latin_noun>-<greek_noun>
  • M2: <greek_modifier>-<greek_noun>-<latin_noun>
  • M3: <latin_noun>-<latin_adjective>-<greek_noun>

generate_identifier joins segments with . by default to keep each label comfortably under DNS's 63-character limit and avoid underscores. If you want the original spec's format, pass word_separator="_" and segment_separator="--".

Entropy math

Current bundled lists are roughly: ~75 Latin adjectives, ~3.5k Latin nouns, ~900 Greek nouns, and 11 Greek modifiers.

  • Combinations per pattern set per segment: on the order of 5e8
  • Bits per segment: approximately 29 bits
  • Default identifier (2 segments): approximately 58 bits

Add more words (≤100 per list) or more segments if you need an even larger space.

API surface

  • generate_identifier(segments=2, patterns=None, bank=DEFAULT_BANK, word_separator="-", segment_separator=".")
  • generate_segment(pattern=None, bank=DEFAULT_BANK, word_separator="-")
  • entropy_bits(segments=2, patterns=Pattern, bank=DEFAULT_BANK)
  • IdioGenerator class if you want to own the RNG or word bank.

Wordlists

All lexemes are ASCII transliterations with no diacritics, chosen to stay abstract, technical, and non-mythological per the spec in AGENT.md.

Development

python -m venv .venv && source .venv/bin/activate
pip install -e .[dev]
pytest

License

MIT License © Causum

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idio-0.1.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idio-0.1.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file idio-0.1.0.tar.gz.

File metadata

  • Download URL: idio-0.1.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for idio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdae6b3da4556cc2da928314ba03a94b08a263529511648b3fbf7bfbff23f1bf
MD5 5831802f023c31b40858892f5185850a
BLAKE2b-256 2cbf64c0404c3112f7a6883b223b49b15b9525437152ce14721c3c04d10e9337

See more details on using hashes here.

File details

Details for the file idio-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: idio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for idio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ad921a96570777110d72da55e9fb7dbfe2287837ec9ca987af5430faa9cfe20
MD5 1779b59e957abe1bd73a7a10d137d445
BLAKE2b-256 d0f0d5ef45a3ae44b0cb7a20ee315bca4959f88292cff01555ce97514d8c7e1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page