{"id":21424,"library":"haikunator","title":"Haikunator","description":"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.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/Atrox/haikunatorpy","tags":["random","name-generator","heroku","unique-id","utility"],"install":[{"cmd":"pip install haikunator","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"Standard import path unchanged since v1.","symbol":"Haikunator","correct":"from haikunator import Haikunator"}],"quickstart":{"code":"from haikunator import Haikunator\n\nh = Haikunator()\nname = h.haikunate()\nprint(name)  # e.g., 'bold-cloud-1234'","lang":"python","description":"Generate a random name using default settings (adjective-noun-token)."},"warnings":[{"fix":"Specify token_hex=False and token_length=4 to restore old behavior if needed.","message":"In 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.","severity":"breaking","affected_versions":"<2.0.0 vs >=2.0.0"},{"fix":"Create a new Haikunator instance per thread or per call.","message":"Haikunator is not thread-safe. Shared instances across threads may produce duplicates.","severity":"gotcha","affected_versions":"all"},{"fix":"Use token_hex=False for numeric tokens.","message":"The '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.","severity":"deprecated","affected_versions":">=2.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from haikunator import Haikunator","cause":"Incorrect import due to misspelling or wrong casing.","error":"AttributeError: module 'haikunator' has no attribute 'Haikunator'"},{"fix":"Use: from haikunator import Haikunator","cause":"Attempting to import haikunator directly instead of Haikunator class.","error":"ImportError: cannot import name 'haikunator' from 'haikunator'"},{"fix":"Set token_hex=True or token_hex=False.","cause":"Passing integer or string to token_hex parameter.","error":"ValueError: token_hex must be a bool"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}