I also have a Python implementation of Tim's TCL PCells (only the FETs) but the PMOSs are not currently correct because things kept improving on the magic implementation. So at the moment I just generate the devices in magic and import them into KLayout.