Python implementations of some typical portfolio optimizations can be found at https://github.com/czielinski/portfolioopt. The corresponding quadratic programs are being solved using the CVXOPT library. (Disclaimer: this is my own GitHub repository.)