MCPcopy Create free account
hub / github.com/diffgram/diffgram / safe_name

Function safe_name

shared/database/action/workflow.py:242–257  ·  view source on GitHub ↗
(name, character_limit = 10)

Source from the content-addressed store, hash-verified

240
241
242def safe_name(name, character_limit = 10):
243 # TODO review using unicdoe normalize ie
244 # https://gist.github.com/wassname/1393c4a57cfcbf03641dbc31886123b8
245
246 name = name[:character_limit]
247
248 name = name.lower() # Email safe no upper case
249 # Want to preserve user capitilized things though
250
251 safe_name = ""
252
253 for char in name:
254 if char in valid_chars:
255 safe_name += char
256
257 return safe_name
258
259
260# see auth_api_new copied from there

Callers 1

update_string_idMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected