Hello everyone!
I use PICOWEB https://github.com/pfalcon/picoweb/blob ... webapp2.py
for start HTTP-server on my micropython-device.
And next i need to made SSE-server on this device.
How could i do that?
I try to translate https://github.com/boppreh/server-sent-events for micropython, but this Python library needs Queue.
Server sent events os Micropython.
- Osipov Andrey
- Posts: 9
- Joined: Mon Apr 06, 2020 12:16 pm
- Location: Saint-Petersburg, Russia
Re: Server sent events os Micropython.
I think that library is fairly tied to flask, but should be fairly easy to move over to any of the HTTP server libraries. I'm not aware of an existing MicroPython queue.Queue implementation, however you might be able to either write the most basic possible thing that does what that library needs yourself, otherwise the CPython implenentation of that class is at https://github.com/python/cpython/blob/ ... b/queue.py
- Osipov Andrey
- Posts: 9
- Joined: Mon Apr 06, 2020 12:16 pm
- Location: Saint-Petersburg, Russia
Re: Server sent events os Micropython.
If someone needs this: https://github.com/osipov-andrey/variou ... icropython
I made this app for OD LAN-RFID device (https://open-dev.org/).
I use picowed and translate https://github.com/boppreh/server-sent-events to micropython with async-logic.
class Queue are hardcoded in program because device does't have async.queues and upip.
I made this app for OD LAN-RFID device (https://open-dev.org/).
I use picowed and translate https://github.com/boppreh/server-sent-events to micropython with async-logic.
class Queue are hardcoded in program because device does't have async.queues and upip.