mUon Nuclear Dipolar Interaction (UNDI) is a small python library to compute the time dependence of the spin polarization of a muon interacting with a number of neighboring nuclei in a solid.
The presence of electric field gradients on the nuclei of the hosting material and externally applied fields can be easily introduced.
The code is documented at https://undi.readthedocs.io and in the associated pubblication.