Hey @Eike_Struckmeier - welcome to the MongoDB community!

I guess I’m struggling to understand exactly what your issue is - if you can connect with a connection string in Compass, that connection string should also work from your Python code.

Can you give me a better idea of (a) what’s different between where Compass is running and where your Python code is running, and (b) what error you’re seeing in your Python code. The more detail you can provide the better.

Mark