5

I know similar questions have been asked here or elsewhere, but I feel like I have read it all and still am unclear on how to solve my specific problem - authentication.

I have written a Bokeh app that is interactive, so requires Bokeh server to be run to serve JavaScript. The app is fed by user data from Strava.

I would like to make the app available to other people, so I need to include authentication to Strava account.

For this reason I thought of incorporating the app in a Django project.

From what I have read, there is no "official" way of doing this and my best bet might be spinning the Bokeh app and the Django on their own servers and view the Bokeh app in an iframe HTML element in Django template.

But would it be then possible to make the apps somehow talk to each other, so that the authentication I need is made through Django and passed to Bokeh app? Also, would it be possible in such setup for the Bokeh app data to be fed from Django models?

I am also willing to switch to other frameworks like Flask and Dash if it would be easier in them, but apparently it is not.

davidism
  • 121,510
  • 29
  • 395
  • 339
barciewicz
  • 3,511
  • 6
  • 32
  • 72
  • Does you app have a REST API that can be accessed? If not why not? If so your golden right. Just write a Django or flask app that consumes your Boken app's REST API. Flask might be more appropriate in this situation. – Red Cricket Nov 07 '18 at 05:28
  • Thanks @Red Cricket, I am not sure, however, how would I go about creating an API for a Bokeh app without first somehow embedding it in a web framework (so I could use Django REST for example) - which is exactly my problem. Possibly I misunderstood your advice... – barciewicz Nov 07 '18 at 08:57
  • 1
    You can check my solution here: https://stackoverflow.com/a/54011735/2180721 – Oleg Jan 03 '19 at 13:16
  • Thanks @Oleg, this seems promising and what I want. WIll look into it. I have since sort of gave up on the idea and learned just as much JavaScript as required to use Plotly.js instead of Dash/Bokeh for the front-end: in the long run I think this is much more flexible and after the initial learning curve - easier. – barciewicz Jan 03 '19 at 16:05

0 Answers0