Bhaskar very nice article, i must say, looking foward to the continuation, i just have to bring to your notice what i think might be a typo on this article. In the session_update event, you are wrote
print(payload.accounts[0]
print(payload.chainId
but i think you meant
print(_session.accounts[0])
print(_session.chainId)
also i think using
debugPrint('statement')
instead of
print('statement')
would clear warnings