Image Management Tool

# gi = DTGatewayInterface.instance
gi = DTGatewayInterface

That changes the semantics. uploadImage() is an instance method on the DTGatewayInterface class - but you’re calling it as DTGatewayInterface.uploadImage() - which is technically allowed in Python, but only if you provide an instance of self, which you don’t have in this case.
Change that line to:
gi = DTGatewayInterface.getInstance().