Registry / devops / haikunator

haikunator

JSON →
library2.1.0pypypi✓ verified 84d ago

Haikunator is a Heroku-like random name generator for Python. It produces combinations of adjectives, nouns, and random numbers or hex values. Version 2.1.0 is current; the library is stable with infrequent releases.

pip install haikunator
INSTALL
IMPORT
SIG · HAIKUNATOR
H
haikunator
devopspythonv2.1.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Haikunator
from haikunator import Haikunator
Standard import path unchanged since v1.

Generate a random name using default settings (adjective-noun-token).

from haikunator import Haikunator h = Haikunator() name = h.haikunate() print(name) # e.g., 'bold-cloud-1234'
Debug
Known issues
breakingIn v2.0.0, the 'token_hex' parameter was added and the default token length changed from 4 to 4 hex digits. Existing code relying on numeric token default may produce different output.
fix
Specify token_hex=False and token_length=4 to restore old behavior if needed.
affects: <2.0.0 vs >=2.0.0
gotchaHaikunator is not thread-safe. Shared instances across threads may produce duplicates.
fix
Create a new Haikunator instance per thread or per call.
affects: all
deprecatedThe 'token_hex' parameter defaults to True in v2.1.0. If you rely on numeric tokens, set token_hex=False explicitly to ensure forward compatibility.
fix
Use token_hex=False for numeric tokens.
affects: >=2.1.0
Errors
Common errors & fixes
AttributeError: module 'haikunator' has no attribute 'Haikunator'
Incorrect import due to misspelling or wrong casing.
fix
Use: from haikunator import Haikunator
ImportError: cannot import name 'haikunator' from 'haikunator'
Attempting to import haikunator directly instead of Haikunator class.
fix
Use: from haikunator import Haikunator
ValueError: token_hex must be a bool
Passing integer or string to token_hex parameter.
fix
Set token_hex=True or token_hex=False.
Upgrade
Version history
2.1.0latest on PyPI · released Sep 20, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
haikunator — pip install haikunator · libregistry