import re
mystr = '["key": val, "key2": val, "key3": v, "key5": 34, "key6": "ef"]'
key_pattern = '"(\w+)"(?=:)'
print(re.sub(key_pattern, r"\1", mystr))
aW1wb3J0IHJlCm15c3RyID0gJ1sia2V5IjogdmFsLCAia2V5MiI6IHZhbCwgImtleTMiOiB2LCAia2V5NSI6IDM0LCAia2V5NiI6ICJlZiJdJwprZXlfcGF0dGVybiA9ICciKFx3KykiKD89OiknCnByaW50KHJlLnN1YihrZXlfcGF0dGVybiwgciJcMSIsIG15c3RyKSk=