Splits PascalCase names into lowercase words joined by underscores: ShippingAddress → shipping_address. Python module names (PEP 8), Rails and Django table names, and database columns use snake_case, while the classes they are named after are PascalCase.
Typical inputs are a list of model classes for which you need table or file names, or C#/Java type names that have to become Python identifiers.
String.Result.models/OrderItem.py
models/ShippingAddress.py
models/PaymentMethod.pymodels/order_item.py
models/shipping_address.py
models/payment_method.pyOnly the file names change; the models/ folder and the .py extension are kept, giving PEP 8 style module names.
PaymentMethod → payment_method.Base64Encoder → base64_encoder.Django and Rails derive table names from class names in snake_case. When creating tables by hand or writing raw SQL, converting OrderItem, ShippingAddress gives order_item, shipping_address (add the plural yourself if your convention uses one).
When splitting a large models.py, each class usually gets a module named after it: PaymentMethod lives in payment_method.py.
XMLParser → xml_parser, IOError → io_error. If two acronyms touch, as in XMLHTTPClient, they merge into xmlhttp_client.User are not recognized (two capitals are required) and stay unchanged.User not converted to user?A PascalCase name must contain at least two capitals for this tool, which prevents ordinary capitalized words from being changed. Lowercase single words yourself.
No. OrderItem becomes order_item; Rails would use order_items, so add the s where your framework expects it.