  We present SIPGI, a spectroscopic pipeline to reduce optical/near-infrared
data from slit-based spectrographs. SIPGI is a complete spectroscopic data
reduction environment which retains the high level of flexibility and accuracy
typical of the standard "by-hand" reduction methods but is characterized by a
significantly higher level of efficiency. This is obtained by exploiting three
main concepts: $i)$ the instrument model: at the core of the data reduction is
an analytic description of the main calibration relations (e.g. spectra
location and wavelength calibration) that can be easily checked and adjusted on
data using a graphical tool; $ii)$ a built-in data organizer that classifies
the data, together with a graphical interface that helps in providing the
recipes with the correct input; $iii)$ the design and flexibility of the
reduction recipes: the number of tasks required to perform a complete reduction
is minimized, while preserving the possibility of verifying the accuracy of the
main stages of data-reduction process with provided tools. The current version
of SIPGI manages data from the MODS and LUCI spectrographs mounted at the Large
Binocular Telescope, and it is our plan to extend SIPGI to support other
through-slit spectrographs. Meanwhile, to allow using the same approach based
on the instrument model with other instruments, we have developed SpectraPy, a
spectrograph independent Python library working on through-slit spectra. In its
current version, SpectraPy produces two-dimensional wavelength calibrated
spectra corrected by instrument distortions. The current release of SIPGI and
its documentation can by downloaded from
http://pandora.lambrate.inaf.it/sipgi/, while SpectraPy can be found at
http://pandora.lambrate.inaf.it/SpectraPy/.
