Hi ;
No python is not supported within the PB IDE. However, you could ...
1) Create a .Net Assembly in the PB IDE and then consume that from your Python code.
2) Create a C# Web API web service from PB (2019 and higher edition) and then call that from Python.
The advantage of which would be to encapsulate your database interactions and of course, leverage the powerful DataWindow features of PB.
HTH
Regards ...Chris