TypeError: Missing 1 required positional argument: 'self'

Solution 1:

You need to instantiate a class instance here.

Use

p = Pump()
p.getPumps()

Small example -

>>> class TestClass:
        def __init__(self):
            print("in init")
        def testFunc(self):
            print("in Test Func")


>>> testInstance = TestClass()
in init
>>> testInstance.testFunc()
in Test Func

Solution 2:

You need to initialize it first:

p = Pump().getPumps()