3

When connecting to PostgreSQL using Psycopg2 user name and password must be supplied to reach the database. When I'm working in my computer keeping password of my local database as plain text is not a problem.

But when I want to use this script in another computer I need to hide credentials. How this can be done ? Any help appreciated

h.

2

1 Answer 1

1

The easiest way to hide credentials is to not store them on the public machine. Use the getpass module to prompt future you for your password.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Ben, what if I want to run the script at specific time intervals like a scheduled task ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.