python generic library