Skip to main content

Phonetic ID is a lightweight package for generating a easy to say ID.

Project description

Phonetic ID is a lightweight package for generating a easy to say ID

Usage

from phonetic_id import generate_phonetic_id

generate_phonetic_id(length=8) # mebifeka
generate_phonetic_id(length=8, append_digits=2) # motizigo58

Entropy

Phonetic IDs have low entropy, so they should not be used for cryptographic purposes.

Info

The length is always rounded to an even number.
There are 5 vowels and 14 consonants.
Each syllable consists of 1 vowel and 1 consonant, allowing for:

5 * 14 = 70 unique syllables

For example, generate_phonetic_id(length=8) produces 4 syllables (since each syllable has 2 characters), resulting in:

70^4 = 24,010,000 combinations ~24.51 bits of entropy

Entropy Table

Length Combinations Entropy (bits)
2 70 ~6.13
4 4,900 ~12.26
6 343,000 ~18.39
8 24,010,000 ~24.52
10 1,680,700,000 ~30.65
12 117,649,000,000 ~36.78
14 8,235,430,000,000 ~42.90
16 576,480,100,000,000 ~49.03

Increasing Entropy

You can increase entropy by using the append_digits argument, which adds N digits to the end.
This effectively multiplies the total number of combinations by 10^N.

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

phonetic_id-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

phonetic_id-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file phonetic_id-1.0.0.tar.gz.

File metadata

  • Download URL: phonetic_id-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for phonetic_id-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dc490ffc2e8c19017681258fd5391f9a1087f71d048aa05fe62b60c7176b11d4
MD5 ff738213024ed03ba1454b3bf66133d3
BLAKE2b-256 bc4e42ec4d0c73f6e3bd4f45ab8056b0283c6c0168b2ae7acbffbbb2d1add738

See more details on using hashes here.

File details

Details for the file phonetic_id-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: phonetic_id-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for phonetic_id-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62a43aeed1ea4fc8df3408329acf687a0b17bc2bf8d1f2450d067a2f08ae9a57
MD5 21cd3c6c6b62c42fc3c3199f69d5b80d
BLAKE2b-256 a469d2b2dbd0916d405fac4ef9665c1d4d5094d3771c7e2531f7156a0c27ef27

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