Skip to main content

Human ID test PyPI version

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())

CLI

This module also comes with a small command line tool: humanid-gen

❯ humanid-gen --help
Usage: humanid-gen [OPTIONS]

  Generate human readable IDs

Options:
  --words INTEGER  Number of words
  --sep TEXT       Separator
  --seed TEXT      Seed to use
  --count INTEGER  Number of IDs to generate
  --help           Show this message and exit.

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

Metadata

Release files for human-id 0.2.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 human-id 0.2.0
File Size Uploaded
human_id-0.2.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for human-id 0.2.0
File Interpreter ABI Platform
human_id-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / human_id-0.2.0.tar.gz

Download URL human_id-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
19768373c96685f8dcd35da7f747e37e7483bb9c2c5383612a2a072d90542422
BLAKE2b-256 checksum
How to use checksums
4a59ef55a878f44a339b401b3d4c4d83b145f99e200abeddf61359a24dd3c40d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

Release files / human_id-0.2.0-py3-none-any.whl

Download URL human_id-0.2.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2c7f0fea0244114a3a6e9b30343733515522031c6948bfdf3e0294a7d76335e
BLAKE2b-256 checksum
How to use checksums
a3fbee29329b25ffea61994b98f72f4efdefcca5703de4d9d37d89871b7ddc53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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