Python version of Connections