We present a new implementation of real-time time-dependent density functional theory (RT-TDDFT) for calculating excited-state dynamics of periodic systems in the open-source Python-based PySCF software package. Our implementation uses Gaussian basis functions in a velocity gauge formalism and can be applied to periodic surfaces, condensed-phase, and molecular systems. As representative benchmark applications, we present optical absorption calculations of various molecular and bulk systems and a real-time simulation of field-induced dynamics of a (ZnO)4 molecular cluster on a periodic graphene sheet. We present representative calculations on optical response of solids to infinitesimal external fields as well as real-time charge-transfer dynamics induced by strong pulsed laser fields. Due to the widespread use of the Python language, our RT-TDDFT implementation can be easily modified and provides a new capability in the PySCF code for real-time excited-state calculations of chemical and material systems.