We developed a new pure-Python pipeline to reduce photometric and polarimetric data: ASTROPOP. It has been designed and optimized to work fully automated with the IAGPOL polarimeter of Pico dos Dias Observatory (OPD; Brazil) and can reduce photometry and polarimetry data from other instruments, especially from SPARC4, a multi-channel polarimeter that has been developed for OPD. We present the results produced by this new code, and compare them with those obtained from PCCDPACK, a traditionally used IRAF package developed for IAGPOL. We also propose to use this code for automatic photometric reduction for the new ROBO40 telescope, also installed at OPD. ASTROPOP is fully open source and distributed under the BSD-3 clause license.