to_module_name

sofia_redux.scan.utilities.class_provider.to_module_name(class_name)[source]

Convert a class name to the base module it may be found in.

Inserts an underscore before any uppercase character or digit (excluding the first) and converts the string to lower case.

Parameters:
class_namestr
Returns:
module_namestr

Examples

>>> print(to_module_name('TestClass1'))
test_class_1