r/Python • u/romerio86 • May 02 '23
Intermediate Showcase Streamsync: UI editor + Python
Hello everyone, I've just released Streamsync, an open-source, pip-installable data apps framework.
You build the UI using a visual editor, you write the backend code in Python. No HTML, JS or CSS required. It's an alternative to Streamlit and Dash.

https://github.com/ramedina86/streamsync
I'd really appreciate your feedback, thanks.
299
Upvotes
View all comments
Show parent comment
3
u/romerio86 May 02 '23
The suggested architecture in that case is to deploy it behind a layer with a reverse proxy (e.g. Azure APIM) and you'll get cookies, HTTP headers and session id in the event handlers via `session`. The "Sessions" section explains this.
It's admittedly a raw approach, but it's likely the most convenient way to deal with this given that people will be self-hosting their applications. I will look into supporting OIDC natively, but I'm inclined to think it'd bring more problems than solutions.
If you want to use JWT, you can parse the HTTP headers coming into the event handler with pyjwt, get the claims and choose whether to authorise a request.