Python codes for modeling the physics of neutron starts. The coupled differential equations describing the equation of state and the structural model is solved. Comparison between the classical model and the relativistic model (Tolman-Oppenheimer-Volkov equation) is shown.