{"id":1733,"library":"stringcase","title":"String Case Converter","description":"Stringcase is a lightweight Python library providing functions to convert strings between various common casing conventions, such as camelCase, snake_case, PascalCase, kebab-case, and more. It is a stable, single-purpose utility with no external dependencies, currently at version 1.2.0, and typically sees infrequent updates unless new casing styles or critical bug fixes are required.","status":"active","version":"1.2.0","language":"en","source_language":"en","source_url":"https://github.com/okunishinishi/python-stringcase","tags":["string","case conversion","utility","text processing","camelcase","snakecase","kebabcase","pascalcase"],"install":[{"cmd":"pip install stringcase","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"camelcase","correct":"from stringcase import camelcase"},{"symbol":"snakecase","correct":"from stringcase import snakecase"},{"note":"Imports the module, functions are then accessed via `stringcase.camelcase()`","symbol":"stringcase","correct":"import stringcase"}],"quickstart":{"code":"import stringcase\n\n# Convert to camelCase\ncamel = stringcase.camelcase('hello_world')\nprint(f\"camelcase: {camel}\") # Expected: helloWorld\n\n# Convert to snake_case\nsnake = stringcase.snakecase('HelloWorld')\nprint(f\"snakecase: {snake}\") # Expected: hello_world\n\n# Convert to kebab-case\nkebab = stringcase.kebabcase('helloWorld')\nprint(f\"kebabcase: {kebab}\") # Expected: hello-world\n\n# Convert to PascalCase\npascal = stringcase.pascalcase('hello-world')\nprint(f\"pascalcase: {pascal}\") # Expected: HelloWorld","lang":"python","description":"Demonstrates basic usage of `stringcase` to convert between camelCase, snake_case, kebab-case, and PascalCase using the module-level functions."},"warnings":[{"fix":"Use `pascalcase` directly or be aware that `uppercamelcase` behaves identically to `pascalcase`.","message":"The `uppercamelcase` function is an explicit alias for `pascalcase`. If you expect a distinction between the two, be aware that they perform the same conversion.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure inputs are always strings. If inputs might be non-string, pre-process them (e.g., `str(value)` or check `isinstance(value, str)`).","message":"All `stringcase` functions expect a string as input. Providing non-string types (e.g., `None`, integers, lists) will typically result in a `TypeError` or `AttributeError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Validate output with non-ASCII or complex Unicode strings if your application requires global character support. Consider character normalization if specific Unicode behaviors are needed.","message":"The library primarily focuses on common English-based casing conventions and may not handle complex Unicode characters or non-Latin scripts as expected for all casing transformations. Test thoroughly with internationalized strings.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}