python3 base64 encode basic authentication

Solutions on MaxInterview for python3 base64 encode basic authentication by the best coders in the world

showing results for - "python3 base64 encode basic authentication"
Aurélien
09 Feb 2017
1userpass = username + ':' + password
2encoded_u = base64.b64encode(userpass.encode()).decode()
3headers = {"Authorization" : "Basic %s" % encoded_u}
Michele
01 May 2016
1alll
2run