Skip to content

case

detdevlib.utils.case

A simple utility for converting strings between different naming conventions.

Case

Bases: Enum

Enum of all supported casing styles.

ConversionManager

Manages string case conversions using a graph-based approach.

This manager allows registering specific conversion functions between cases and automatically finds the shortest path for multistep conversions.

__init__

__init__()

Initialize an empty ConversionManager.

add_conversion

add_conversion(from_case: Case, to_case: Case)

Decorator to register case conversion functions and update graph.

get_conversion

get_conversion(
    from_case: Case, to_case: Case
) -> ConversionFunc

Finds the shortest path and returns a composite conversion function.