MCPcopy
hub / github.com/danielgtaylor/python-betterproto / safe_snake_case

Function safe_snake_case

src/betterproto/casing.py:18–22  ·  view source on GitHub ↗

Snake case a value taking into account Python keywords.

(value: str)

Source from the content-addressed store, hash-verified

16
17
18def safe_snake_case(value: str) -> str:
19 """Snake case a value taking into account Python keywords."""
20 value = snake_case(value)
21 value = sanitize_name(value)
22 return value
23
24
25def snake_case(value: str, strict: bool = True) -> str:

Callers 4

_from_dict_initMethod · 0.85
from_pydictMethod · 0.85
reference_absoluteFunction · 0.85
reference_cousinFunction · 0.85

Calls 2

snake_caseFunction · 0.85
sanitize_nameFunction · 0.85

Tested by

no test coverage detected