restructure python lib