def string_b64encode(s):
return base64.urlsafe_b64encode(s).strip('<STR_LIT:=>')<EOL>
This function is useful to convert a string to a valid id to be used in ES.
You can use it to generate an ID for urls or some texts