Sending sserequests and handling events

I need some guidance on sending sserequests and handling events in python ?

Note :Currently the client code just hangs and using the below code…

request = requests.get(reqUrl, stream=True)
client = sseclient.SSEClient(request)
print(‘Printing Client Events’,str(client.events()))
for event in client.events():
pprint.pprint(json.loads(event.data))
print(‘Closing Connection…’)

i dont think SSEClient takes a response event from from requests.get but a plain vanilla string with url on it.

1 Like