Install & Compatibility
Where this runs
tested against v3.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.034s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.0s · import 0.038s · 18MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Converter
✓ from case_conversion import Converter
Import the main Converter class for object-oriented usage.
Top-level functions (e.g., camel, snake)
✓ import case_conversion
case_conversion.camel("some string")
Individual case conversion functions are available directly from the package for convenience.
This quickstart demonstrates both the `Converter` class and the convenience functions for various case conversions, including basic usage, custom acronym handling, and Unicode support.
from case_conversion import Converter
# Using the Converter class
converter = Converter()
camel_case_string = converter.camel("FOO_BAR_STRING")
pascal_case_string = converter.pascal("another string")
print(f"Camel Case: {camel_case_string}")
print(f"Pascal Case: {pascal_case_string}")
# Using top-level convenience functions
import case_conversion
snake_case_string = case_conversion.snake("Hello World Example")
kebab_case_string = case_conversion.kebab("http header case")
print(f"Snake Case: {snake_case_string}")
print(f"Kebab Case: {kebab_case_string}")
# Custom acronym handling
custom_acronym_converter = Converter(acronyms=["BAD", "HTTP"])
custom_acronym_snake = custom_acronym_converter.snake("fooBADHTTPError")
print(f"Custom Acronym Snake Case: {custom_acronym_snake}")
# Unicode support
unicode_snake = case_conversion.snake("fóó-bar-string")
print(f"Unicode Snake Case: {unicode_snake}")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'case_conversion'
The 'case-conversion' library is not installed in the current Python environment.
fixpip install case-conversion
AttributeError: module 'case_conversion' has no attribute 'pascalcase'
Case conversion methods like `pascalcase` are not directly available on the `case_conversion` module. They are methods of an instantiated `Converter` object, and the method name is `pascal` (not `pascalcase`).
fixfrom case_conversion import Converter
converter = Converter()
result = converter.pascal("my_string") TypeError: 'str' object is not callable
A variable named 'str' has been defined, inadvertently overwriting the built-in `str()` function, and then an attempt is made to call `str` as a function.
fixRename the variable that is conflicting with the built-in `str` function to avoid shadowing it. For example, use `my_string` instead of `str`.
Upgrade
Version history
3.0.2latest on PyPI · released Aug 27, 2025
Audit
Dependencies
No dependency data recorded yet.