magpylib
Python package for computation of magnetic fields of magnets, currents and moments.
Python package for computation of magnetic fields of magnets, currents and moments.
To install this package, run one of the following:
Magpylib computes static magnetic fields of magnets, currents and other sources from analytical expressions, in vectorized form, and computes the forces and torques between them. Sources and sensors can be positioned, moved and rotated along paths, grouped into collections, and displayed with Matplotlib, Plotly or PyVista.
Summary
Python package for computation of magnetic fields of magnets, currents and moments.
Last Updated
Nov 8, 2026 at 05:22
License
BSD-3-Clause
Supported Platforms
GitHub Repository
https://github.com/magpylib/magpylibDocumentation
https://magpylib.readthedocs.io/en/stable/