misc

Miscellaneous utilities

misc.camelize(string, uppercase_first_letter=True)

Convert strings to CamelCase. Examples:

>>> camelize("device_type")
"DeviceType"
>>> camelize("device_type", False)
"deviceType"

camelize() can be though as a inverse of underscore(), although there are some cases where that does not hold:

>>> camelize(underscore("IOError"))
"IoError"
Parameters:uppercase_first_letter – if set to True camelize() converts strings to UpperCamelCase. If set to False camelize() produces lowerCamelCase. Defaults to True.