Abstract In the present paper, we will incorporate three very useful aspects of astrophysics, generalized polytropes, Karmarkar condition and complexity factor to study compact objects. For this purpose a charged anisotropic fluid distribution is used under static spherical symmetry. We develop framework for class I Lane–Emden equations non-isothermal isothermal regimes. Generalized polytropic ...