  Understanding electron drift and diffusion in gases and gas mixtures is a
topic of central importance for the development of modern particle detection
instrumentation. The industry-standard MagBoltz code has become an invaluable
tool during its 20 years of development, providing capability to solve for
electron transport (`swarm') properties based on a growing encyclopedia of
built-in collision cross sections. We have made a refactorization of this code
from FORTRAN into Cython, and studied a range of gas mixtures of interest in
high energy and nuclear physics. The results from the new open source PyBoltz
package match the outputs from the original MagBoltz code, with comparable
simulation speed. An extension to the capabilities of the original code is
demonstrated, in implementation of a new Modified Effective Range Theory
interface. We hope that the versatility afforded by the new Python code-base
will encourage continued use and development of the MagBoltz tools by the
particle physics community.
