Spectroflat flat fields spectro-polarimetric data. It can be plugged into existing Python-based data reduction pipelines or used as a standalone calibration and performance analysis tool. The code includes smile distortion correction and flat field extraction. The library expects the spatial domain on the vertical-axis and the spectral domain on the horizontal axis. Spectroflat does not include any file reading/writing routines and expects numpy arrays as input.