Would it be easier to use if this were just

if originating:
    req.addAVP(self.cx.getAVP('Originating-Request').withInteger32(1))

That way, the caller wouldn't need to know the details of the Diameter spec.