Why not having the member variables as private/protected and provide getter/setter for Username and only getter for Password?
So using DataSource more as a class than as a struct.
I'm wrapping C++ to Python using SWIG. How can I tell SWIG that a property is read-only?
std::string Password; // Read-only?