You don't need to use generate_session for every run. You can directly set access_token kite.set_access_token("your obtained access token"), post successfully generating access toke…
pykiteconnect comes with reconnect support. You don't have to do anything, library itself takes care of reconnection and re-subscribes after reconnect. You can check out documentation to know how to …