Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If you hardcode usernames and passwords, you cannot check in the code to public git repositories.
- # A solution I am using is to create a `credentials.json` file and storing the password there
- # cerdentials.json :
- # {
- # "user":"bharath",
- # "password":"bharath_secret_password"
- # }
- #
- # add this file to .gitignore
- #
- # This file my be protected on apache web server using -
- # <Files ~ "\credentials.json$">
- # Require all denied
- # </Files>
- import json
- with open('credentials.json') as json_data:
- credentials = json.load(json_data)
- login(username=credentials['user'] password=credentials['password']")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement