Check out sympy.physics.units. I've been using it for unit-checking in my symbolic work for a few years.
https://docs.sympy.org/latest/modules/physics/units/index.ht...