working on api python