stackoverflow

View on StackOverflow

There is also tocamelcase to easily convert from snake case to camel case.

Install

$ pip install tocamelcase

and then you can use it like this:

import tocamelcase

print(tocamelcase.convert("non_camel_case"))
# -> non_camel_case → NonCamelCase

There is also decamelize that is the inverse of this module.