I use Python and Django to create web applications, which we store in source control. The way Django is normally set up, the passwords are in plain text within the settings.py f
This is an old question and the person who asked I'm sure has found a way to deal with this, but I was looking this up myself and figured since the answers here weren't quite the solution I was looking for I might add what I did for any other people potentially asking the same question.
What I did was use getpass() to have the settings file ask for the password when run at startup.
from getpass import getpass
#[...]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', #or whatever DB you use
'NAME': 'mydb',
'USER': 'myuser',
'PASSWORD': getpass(),
'HOST': '',
'PORT': '',
}
}