Anton Egorov
Anton Egorov

Reputation: 1194

Changing Spyne constants

spyne.const has the following

REQUEST_SUFFIX = ''
"""The suffix for function response objects."""

RESPONSE_SUFFIX = 'Response'
"""The suffix for function response objects."""

How could I configure my own suffixes? I want all my methods' request names to be <method>RQ and responses to be <method>RS

Upvotes: 4

Views: 297

Answers (1)

Burak Arslan
Burak Arslan

Reputation: 8001

In theory, this should work right before instantiating your Application but just to be on the safe side, before the very first import from the spyne namespace, you should do this:

import spyne.const
spyne.const.REQUEST_SUFFIX ='RQ'
spyne.const.RESPONSE_SUFFIX ='RS'

Upvotes: 2

Related Questions