Running Appium for multiple devices

Hi Im using appium with python and pytest.
What is the best way how to set capabilities for different devices on different platforms ?
best according to the parameter define in command line ?

This blog post pretty much covers everything:

https://appiumpro.com/editions/28-running-multiple-appium-tests-in-parallel

Sample code is in Java, but capabilities examples will show you what you need to do.