How to pass appium server arguments through python script

Currently I am passing appium server arguments like below

    desired_caps = dict()
    desired_caps['platformName'] = 'iOS'
    desired_caps['platformVersion'] = '9.1'
    desired_caps['deviceName'] = 'iPhone Simulator'
    desired_caps['app'] = os.path.abspath('/Users/test.app')
    self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

And then I run appium through terminal as appium

But how can I add other server arguments. e.g.

desired_caps['full-reset'] = True
desired_caps['command-timeout'] = '5m'

If I add above part it doesn’t set those parameters. So I have to run like

appium --full-reset --command-timeout 300

The equivalent arguments that you pass in through DesiredCapabilities objects are in camelCase. Try using “fullReset” and “commandTimeout” (or “newCommandTimeout”).

Try seeing if there are constants defined for the capabilities you are specifying. That would probably take some of these hard-coded magic strings out of your test code.

You can see all of the capabilities listed here: