  We present a flexible, open-source Python package for the accurate simulation
of the $z$-propagation dynamics of ultrashort optical pulses in nonlinear
waveguides, especially valid for few-cycle pulses and their interaction. The
simulation approach is based on unidirectional propagation equations for the
analytic signal. The provided software allows to account for dispersion,
attenuation, four-wave mixing processes including, e.g., third-harmonic
generation, and features various models for the Raman response. The propagation
equations are solved on a periodic temporal domain. For $z$-propagation, a
selection of pseudospectral methods is available. Propagation scenarios for a
custom propagation constant and initial field pulses can either be specified in
terms of a HDF5 based input file format or by direct implementation using a
python script. We demonstrate the functionality for a test-case for which an
exact solution is available, by reproducing exemplary results documented in the
scientific literature, and a complex propagation scenario involving multiple
pulses. The py-fmas code, its reference manual, an extended user guide, and
further usage examples are available online at
https://github.com/omelchert/py-fmas.
