skillfed

case-conversion

Convert between different types of cases (unicode supported)

case-conversion v3.0.2 614.2K downloads/30d#5,749 on PyPI18
Permissive license MIT AGING released

What it is and what it does

case-conversion is a Python package that converts text between different naming conventions—camelCase, snake_case, kebab-case, PascalCase, CONST_CASE, and many others—without requiring you to specify which format the input is in. It automatically detects the source case, handles acronyms intelligently (so HTTPError stays together rather than splitting on each capital letter), and fully supports Unicode characters including accented letters. The package is dependency-free and works by exposing both a Converter class for fine-grained control and top-level convenience functions for quick conversions.

It originated as a port of a Sublime Text plugin and has been maintained since 2016. The core use case is anywhere you need to normalize or transform identifier names—code generation, API clients, configuration tools, or any system that needs to convert between naming conventions while preserving meaning. You can initialize a Converter with custom acronyms if the built-in detection doesn't match your domain's terminology.

Use it for:

  • Generate code or variable names in different languages that use different case conventions (e.g., Python snake_case from camelCase API responses).
  • Normalize user input or configuration keys to a canonical case format for comparison or storage.
  • Build CLI tools or code generators that output identifiers in the target language's preferred case style.
  • Parse and convert between naming conventions in API clients or data transformation pipelines.
  • Handle acronyms correctly when converting domain-specific terms (e.g., HTTPError, XMLParser) across case formats.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts strings between any case format (camelCase, snake_case, kebab-case, PascalCase, CONST_CASE, and others) with automatic case detection and acronym awareness, supporting Unicode characters.

Yes. The package is stable (production-rated), has zero dependencies, supports modern Python versions, and solves a common string-manipulation problem cleanly. The MIT license poses no barriers. The only minor note is that it's aging (352 days since last release), but the recent repository activity and lack of open issues suggest it's mature rather than abandoned. Install it if you need case conversion; it's lightweight and reliable.

Install

case-conversion on PyPI

pip

pip install case-conversion

uv

uv add case-conversion

poetry

poetry add case-conversion

Installing case-conversion

Before you install

Low friction: zero runtime dependencies, pure Python wheel, supports Python 3.10+. Last commit was recent (2025-08-27), though the package is marked as aging with 352 days since the last release.

License in practice

MIT license (permissive) allows use in most projects without restriction. No license-based barriers to adoption.

Quickstart

pip install case-conversion

from case_conversion import Converter
converter = Converter()
print(converter.camel("FOO_BAR_STRING"))  # 'fooBarString'

# Or use convenience functions:
import case_conversion
print(case_conversion.snake("fooBarString"))  # 'foo_bar_string'

Requires Python 3.10 or later.

Verify before relying

  • Performance characteristics on very large strings or bulk conversions are not documented.
  • Whether the acronym detection algorithm handles all edge cases or has known limitations.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 352 days since the last release
Last repo commit
First released
Downloads 614,227/month — #5,749 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: case_conversion-3.0.2-py3-none-any.whl

Keywords: camel, case, conversion, convert, kebab, pascal, snake, spinal, unicode

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

case conversioncamelcase to snake casestring case formatterconvert between case formatsunicode case conversionacronym-aware case convertercase auto-detection
string-formattingunicode-awarecode-generation

More Text Processing packages