credentials = (
    '{{"auth": {{"tenantName": "{tenant}", "passwordCredentials": {{"username": "{admin}", "password": "{password}"}}}}}}'
    .format(tenant='me', admin='test', password='123'))
KeyError when using .format on a string in Python