{"id":27049,"library":"humps","title":"humps","description":"humps is a Python library for converting strings between camelCase, snake_case, PascalCase, and other cases. The current version is 0.2.2. It has a low release cadence; the last release was in 2017.","status":"maintenance","version":"0.2.2","language":"python","source_language":"en","source_url":"https://github.com/erikhuizinga/humps","tags":["camelCase","snake_case","case conversion","string utilities"],"install":[{"cmd":"pip install humps","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Old import path from humps.camel is deprecated; use humps.camelize directly","wrong":"from humps import camel","symbol":"camelize","correct":"from humps import camelize"},{"note":"No common wrong import","wrong":"from humps import decamelize","symbol":"decamelize","correct":"from humps import decamelize"},{"note":"No common wrong import","wrong":"from humps import pascalize","symbol":"pascalize","correct":"from humps import pascalize"}],"quickstart":{"code":"from humps import camelize, decamelize, pascalize\n\n# Convert snake_case to camelCase\nprint(camelize('hello_world'))  # 'helloWorld'\n\n# Convert camelCase to snake_case\nprint(decamelize('helloWorld'))  # 'hello_world'\n\n# Convert snake_case to PascalCase\nprint(pascalize('hello_world'))  # 'HelloWorld'","lang":"python","description":"Basic usage: convert strings between cases."},"warnings":[{"fix":"For dict conversion, use humps.camelize or see the main module. Note that automatic dict key conversion is limited.","message":"humps only works on single strings, not on dict keys or nested structures. Use humps.main.convert for dict conversion.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Manually handle underscore preservation if needed.","message":"humps does not preserve leading or trailing underscores in snake_case conversion (e.g., '_private' becomes 'Private').","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use 'from humps import camelize' instead.","message":"The old import path 'from humps.camel import case' is deprecated since v0.2.2.","severity":"deprecated","affected_versions":">=0.2.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from humps import camelize' or ensure you have the latest version (>=0.2.2).","cause":"Importing from humps.camel (old pattern) after v0.2.2, or a misspelled module name.","error":"AttributeError: module 'humps' has no attribute 'camel'"},{"fix":"Ensure input is a string. For dict conversion, use loops or the humps.main.convert function.","cause":"Passing a non-string (e.g., integer, dict) to humps functions.","error":"TypeError: expected string or bytes-like object"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}