Skip to main content

Human readable IDs, in Python

Project description

Human ID

A simple library for generating human IDs like look-dead-game-story or get-nice-office-side.

Install with pip install human-id

Usage:

from human_id import generate_id

# Simple: "appear-hard-idea-case"
generate_id()

# Custom separator: "do,past,job,number"
generate_id(separator=",")

# More words: "say-may-ask-traditional-power-week"
generate_id(word_count=10)

# Custom seed - the same UUID will produce the same ID.
import uuid
generate_id(seed=uuid.uuid4())

Implementation

This library contains 100 of the most common English nouns, adjectives and verbs, and will generate a phrase containing several of each type, in the order verb, adjective, noun.

The most common words where chosen because they are typically shorter and simpler to read or type, which is a key property of human readable IDs.

By default the ID will contain 4 words, which means there are 300^4 possible IDs (8,100,000,000). If your use case requires more IDs then you can up the number of words at the expense of the readability factor. To have the same number of possible IDs as UUIDs you require 15 words:

may-hold-come-foreign-low-white-cold-team-point-study-others-home-service-body-child

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

human_id-0.1.0.post1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

human_id-0.1.0.post1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file human_id-0.1.0.post1.tar.gz.

File metadata

  • Download URL: human_id-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Darwin/19.4.0

File hashes

Hashes for human_id-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 4618e65cb7669c5c482fd9f4f35d18b759820d589dac02b5bb81048b1c203100
MD5 9b3767c4763333d4e26dbf7eb84b0854
BLAKE2b-256 dcf530348f8778ee4e45aae8f223e8e5293f05a51fdea377dc5588e29d760e0e

See more details on using hashes here.

File details

Details for the file human_id-0.1.0.post1-py3-none-any.whl.

File metadata

  • Download URL: human_id-0.1.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Darwin/19.4.0

File hashes

Hashes for human_id-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 d34fb2c5bdeae3a205f4f5de6546dc859cba59f60a4b27008e521bf1f26b1185
MD5 ef1db0bf91e3f058035cc332dcd3759a
BLAKE2b-256 1b4f61387927435dddfd2b98259e7c4a284e14a709150c086761743473097137

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