{"id":6557,"library":"case-converter","title":"Case Converter","description":"A robust Python package (v1.2.0) for transforming string cases such as \"Hello, world!\" into \"helloWorld\" (camelCase). It offers various conversion types including camelCase, snake_case, kebab-case, macro_case, pascalCase, cobol-case, flatcase, and titlecase. The library is actively maintained with regular updates, and designed to be lightweight with no external dependencies.","status":"active","version":"1.2.0","language":"en","source_language":"en","source_url":"https://github.com/chrisdoherty4/python-case-converter","tags":["string","case conversion","text processing","utility"],"install":[{"cmd":"pip install case-converter","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"camelcase","correct":"from caseconverter import camelcase"},{"symbol":"snakecase","correct":"from caseconverter import snakecase"},{"symbol":"* (all converters)","correct":"import caseconverter as cc\n# or\nfrom caseconverter import *"}],"quickstart":{"code":"import caseconverter as cc\n\ntext = \"Hello, beautiful World!\"\n\n# Convert to camelCase\ncamel_text = cc.camelcase(text)\nprint(f\"Original: '{text}' -> CamelCase: '{camel_text}'\")\n\n# Convert to snake_case\nsnake_text = cc.snakecase(text)\nprint(f\"Original: '{text}' -> SnakeCase: '{snake_text}'\")\n\n# Convert to MACRO_CASE and keep punctuation\nmacro_text_with_punc = cc.macrocase(\"Hello, world! How are you?\", strip_punctuation=False)\nprint(f\"Original: 'Hello, world! How are you?' -> MacroCase (with punc): '{macro_text_with_punc}'\")\n\n# Convert to kebab-case using custom delimiters\nkebab_custom_delims = cc.kebabcase(\"first_part-second part\", delims=['_', ' '])\nprint(f\"Original: 'first_part-second part' -> KebabCase (custom delims): '{kebab_custom_delims}'\")","lang":"python","description":"Demonstrates basic string case conversion using various functions, including options for preserving punctuation and using custom delimiters."},"warnings":[{"fix":"Pass `strip_punctuation=False` as an argument to the conversion function (e.g., `camelcase(\"text!\", strip_punctuation=False)`).","message":"By default, punctuation is stripped during string conversion. If you need to retain punctuation, you must explicitly pass `strip_punctuation=False` to the conversion function.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Provide a list or string of custom delimiters using the `delims` argument (e.g., `snakecase(\"text|with|pipes\", delims=['|'])`).","message":"The library uses a default set of delimiters (' ', '-', '_') to identify word boundaries. If your input string uses other characters as delimiters that you want to be treated as such, you need to specify them using the `delims` argument.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}