modularize python data call