Registry / serialization / casefy

casefy

JSON →
library1.1.0pypypi✓ verified 29d ago

Casefy is a lightweight Python package for converting the casing of strings. It supports various case styles like snake_case, camelCase, PascalCase, kebab-case, and more, including Unicode characters. The library has no third-party dependencies. It is currently at version 1.1.0 and receives updates as needed for bug fixes or new features.

pip install casefy
INSTALL
IMPORT
SIG · CASEFY
C
casefy
serializationpythonv1.1.0
Install
1.5s avg
Import
12ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.1.0 · 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
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 17.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.008s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

casefy
✓ import casefy

Initialize the library by importing 'casefy', then use its various functions like `snakecase`, `camelcase`, or `pascalcase` to convert strings between different casing conventions.

import casefy # Convert a string to snake_case text = "HelloWorldExample123" snake_cased_text = casefy.snakecase(text) print(f"Original: {text}\nSnake Case: {snake_cased_text}") # Convert to camelCase camel_cased_text = casefy.camelcase("another-example_string") print(f"Camel Case: {camel_cased_text}") # Convert to PascalCase with specific grouping pascal_cased_text = casefy.pascalcase("foo_bar_baz", keep_together=["BAR"]) print(f"Pascal Case: {pascal_cased_text}")
Debug
Known issues
breakingThe behavior of the `keep_together` parameter in `snakecase` and `separatorcase` functions was updated in version 1.1.0. If you were relying on specific word grouping behavior with this parameter, review your usage.
fix
Review the documentation for `snakecase` and `separatorcase` to understand the updated behavior of `keep_together` and adjust your code if necessary.
affects: >=1.1.0
gotchaCasefy was created as a spiritual successor to the `python-stringcase` library. While the API was kept similar to facilitate migration, users migrating from `python-stringcase` should verify full compatibility as subtle differences may exist.
fix
Test your application thoroughly after migrating from `python-stringcase` to `casefy` to ensure all edge cases and expected conversions are handled correctly. Refer to Casefy's official documentation for current API behavior.
affects: <1.0.0 (for those migrating from `python-stringcase`)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'casefy'
The 'casefy' package is not installed in the Python environment you are currently using.
fix
Run `pip install casefy` in your terminal to install the package.
AttributeError: module 'casefy' has no attribute 'to_snakecase'
You are attempting to call a function that does not exist or is misspelled in the 'casefy' library (e.g., using 'to_snakecase' instead of 'snakecase').
fix
Refer to the 'casefy' documentation and use the correct function name, such as `casefy.snakecase()` for converting to snake_case.
TypeError: expected string or bytes-like object
A function from the 'casefy' library was called with an argument that is not a string or bytes-like object, such as an integer, list, or None.
fix
Ensure that the input argument to all 'casefy' functions is a string or bytes-like object.
Upgrade
Version history
1.1.0latest on PyPI · released Mar 7, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
casefy — pip install casefy · libregistry