Pycosmicstar studies the star formation history for different cosmological models. The package contains two abstract classes, cosmology and structureabstract. The class cosmology is passed as a parameter for the classes that implement structureabstract. This approach takes polymorphism into account. The modeling of structures and star formation are not strongly dependent on the cosmology. Pycosmicstar generates a new cosmological class that implements the methods of abstract class cosmology that is useful to study, for example, the role of dark energy in the cosmic star formation rate evolution.