Cadabra and python algorithms in general relativity and cosmology I: Generalities (Revista Mexicana de Física E)