flip_api.utils.formatters
Functions
|
Convert a snake_case string to PascalCase. |
Module Contents
- flip_api.utils.formatters.to_pascal_case(snake_str: str) str[source]
Convert a snake_case string to PascalCase.
This is needed for the UI to understand the permissions format. Example: CAN_ACCESS_ADMIN_PANEL -> CanAccessAdminPanel
- Parameters:
snake_str (str) – The snake_case (or UPPER_SNAKE_CASE) string to convert.
- Returns:
The input string converted to PascalCase.
- Return type:
str