prepare Python interface