Python wrapper template for C functionality