Near-perfect diffracting crystals have many uses in x-ray optics including as monochromators, energy analyzers, and phase retarders. The usefulness of a particular Bragg reflection is often related to its angular acceptance and efficiency, as is determined by the reflection’s structure factor. Silicon crystals, which belong to the same face-centered cubic space group 𝐹𝑑3̅𝑚 as germanium and diamond, are readily available in large and highly pure ingots. Combined with their high thermal conductivity and low thermal expansion, this makes them suitable for synchrotron x-ray beamlines. However, less symmetric trigonal crystals such as sapphire, lithium niobate, and α-quartz offer a better choice of high-energy-resolution Bragg reflections near backscattering with less likelihood of parasitic Bragg reflections. Because these crystals’ atoms vibrate anisotropically and shift relative to each other with temperature, the temperature dependence of their structure factors is not a given by a simple Debye-Waller factor. Also, many crystal structures may be described by several different conventions of origin and lattice vectors. A Python three software package, PyCSFex, is presented here for the rapid calculation of large numbers of structure factors of any crystal described in any convention. It can run on its own or as part of an already existing software package. Users can extend the package to new crystals by writing their own material files. α-Quartz is chosen as an example because it has already been successfully used in backscattering x-ray energy analyzers and presents the complexities previously mentioned.