QubeSpec is a simple but powerful python package to fit optical astronomical spectra and more importantly analysing IFS cube from JWST/NIRSpec, JWST/MIRI, VLT/KMOS and VLT/SINFONI. The code has built models for fitting Halpha, [OIII], Hbeta, [SII] and [NII] or any other emission lines. The code is flexible to fit galaxies and Type-1 and Type-2 AGN with or without outflows. You can see and download the code here.
The full tutorial with QubeSpec can be found here