pyhumps
🐫 Convert strings (and dictionary keys) between snake case, camel case and pascal case in Python. Inspired by Humps for Node
What it is and what it does
pyhumps is a lightweight string and dictionary-key case converter for Python. It transforms between snake_case, camelCase, PascalCase, and kebab-case, and provides checker functions to validate what case a string is already in. The package has no runtime dependencies and works across Python 3.6, 3.7, 3.8, 3.9, and 3.10 on both CPython and PyPy.
Typical use cases include normalizing API responses (e.g., converting camelCase JSON keys from external APIs into snake_case for Python code), preparing data for external services that expect a different naming convention, and validating or asserting the case of identifiers. The description includes a cookbook example of wrapping Boto3 to transparently convert between AWS API conventions and Pythonic naming.
Use it for:
- Normalize camelCase JSON responses from REST APIs into snake_case Python dictionaries for idiomatic code.
- Convert snake_case Python function arguments to camelCase before sending to external APIs or services.
- Validate that configuration keys or identifiers conform to an expected naming convention.
- Wrap third-party libraries to transparently convert between their naming conventions and yours.
- Handle acronyms and abbreviations correctly when converting between cases (e.g., APIResponse → api_response).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts strings and dictionary keys between snake_case, camelCase, PascalCase, and kebab-case, plus functions to check what case a string is in.
Yes. pyhumps is a stable, zero-dependency utility with no known vulnerabilities, permissive licensing, and broad Python version support. It solves a common data-transformation problem cleanly. The dormant maintenance status is acceptable for a mature utility that does one thing well; however, if you need active support or expect breaking changes in future Python versions, flag this for periodic review.
Install
pyhumps on PyPI
pip
pip install pyhumpsuv
uv add pyhumpspoetry
poetry add pyhumpsInstalling pyhumps
Before you install
Low friction install with no runtime dependencies. Maintenance is dormant—last release was 2022-10-21 and last commit 2024-08-03—but the package remains available and stable.
License in practice
Licensed under The Unlicense (Unlicense), a permissive public-domain-equivalent license with no restrictions on use, modification, or distribution.
Quickstart
pip install pyhumps
import pyhumps
pyhumps.camelize("jack_in_the_box") # jackInTheBox
pyhumps.decamelize("rubyTuesdays") # ruby_tuesdays
pyhumps.pascalize("red_robin") # RedRobin
pyhumps.kebabize("white_castle") # white-castle
Verify before relying
- Whether the dormant maintenance status (last release 2022-10-21) poses a risk for future Python version compatibility or edge-case bug fixes.
- Support for Python versions beyond 3.10 given the last release date.
Package facts
| License | The Unlicense (Unlicense) (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,393 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,095,085/month — #1,787 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyhumps-3.8.0-py3-none-any.whl
Keywords: humps, snakecase, convert case, camelcase
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
camel-converterConverts strings and dictionary keys between…
permissive · top 5,000 on PyPI
humpsConverts strings to camelCase format, handling…
copyleft · top 15,000 on PyPI
pyheckConverts strings between case styles…
permissive · top 15,000 on PyPI
case-convertConverts strings between different case formats…
copyleft · top 15,000 on PyPI
stringcaseConverts strings between different naming…
permissive · top 5,000 on PyPI
case-conversionConverts strings between any case format…
permissive · top 15,000 on PyPI
pocketsPockets provides a collection of utility…
permissive · top 15,000 on PyPI
djangorestframework-camel-caseConverts JSON field names between camelCase and…
permissive · top 15,000 on PyPI
boa-strConverts strings to snake_case by normalizing…
permissive · top 5,000 on PyPI
casefyCasefy converts strings between different…
permissive · top 5,000 on PyPI