pypif.util.case module

pypif.util.case.keys_to_snake_case(camel_case_dict)

Make a copy of a dictionary with all keys converted to snake case. This is just calls to_snake_case on each of the keys in the dictionary and returns a new dictionary.

Parameters:camel_case_dict (Dictionary.) – Dictionary with the keys to convert.
Returns:Dictionary with the keys converted to snake case.
pypif.util.case.to_camel_case(snake_case_string)

Convert a string from snake case to camel case. For example, “some_var” would become “someVar”.

Parameters:snake_case_string – Snake-cased string to convert to camel case.
Returns:Camel-cased version of snake_case_string.
pypif.util.case.to_capitalized_camel_case(snake_case_string)

Convert a string from snake case to camel case with the first letter capitalized. For example, “some_var” would become “SomeVar”.

Parameters:snake_case_string – Snake-cased string to convert to camel case.
Returns:Camel-cased version of snake_case_string.
pypif.util.case.to_snake_case(camel_case_string)

Convert a string from camel case to snake case. From example, “someVar” would become “some_var”.

Parameters:camel_case_string – Camel-cased string to convert to snake case.
Returns:Snake-cased version of camel_case_string.