Maintain Login for multiple tests using Python

I am automating an android application using Appium and Python. I want to login in the app once and then run multiple test cases. Though till now I haven’t been to maintain it and had to login again after every test case scenario. Is there any way to login once and then check that whether the app is already logged in the next case runs otherwise it logs in the user and runs the next test.

you capabilities are? looks like you reset app with each test. -> Different capabilities for different scenarios

desired_cap = {

"deviceName": "emulator-5554",
"platformName": "Android",
"app": "apk location",


I am only using these capabilities for now.

so start using 2 more lines mentioned in link above.

I have seen your answer regarding fullReset, fastReset and nothing, but I am unable to see an example of this. How to implement the logic? Please elaborate a little with an example.