The comprehension of pulsed light propagation is of paramount importance in fiber optics. Here, we present a general method to describe the propagation of pulses in any kind of optical fiber, regardless of its fabrication process or constituent materials. As a result, we obtain a rich toolbox for the analysis and synthesis of optical fibers, which allows us to circumvent the resolution of Maxwell's equations by using heavy-computational numerical methods. To illustrate this, we analyze the pulse propagation problem in nonparaxial anisotropic single-core and multi-core fibers that cover a large variety of optical fibers including classical weakly guiding fibers, optical gain fibers, polarization-maintaining fibers, highly nonlinear fibers, and photonic crystal fibers. Moreover, it is shown that our method can be applied to any kind of guided and unguided medium undergoing spatial and temporal perturbations, provided that the distance and temporal width between different consecutive spatial and temporal medium perturbations are respectively higher than the spatial and temporal width of the optical pulses.