Why do I get “TypeError: Missing 1 required positional argument: ‘self'”?
To use the class, first create an instance, like so: p = Pump() p.getPumps() A full example: >>> class TestClass: … def __init__(self): … print(“init”) … def testFunc(self): … print(“Test Func”) … >>> testInstance = TestClass() init >>> testInstance.testFunc() Test Func