For existing and future projects dedicated to measuring precise RVs, we have created an open-source, flexible data reduction software to extract RVs from echelle spectra via the I2 cell method. The software, called pyodine, is completely written in Python and has been built in a modular structure to allow for easy adaptation to different instruments. We adapted pyodine to several instruments, two of them being the Hertzsprung SONG located at Teide Observatory (SONG hereafter), and the Hamilton spectrograph at Lick Observatory (Lick hereafter). Both for SONG and Lick data, the pyodine results generally match the RV precision achieved by the dedicated instrument pipelines. Notably, results from our code confirm the planet-induced RV variations of the star HIP 36616 on spectra from SONG and Lick. A probable instrumental effect of SONG is still visible in the pyodine RVs of the star sigma Dra, despite being a bit damped as compared to the original RVs computed by iSONG.