☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Animating and pausing in an app

Community Support
Christopher_Nolan
Christopher_Nolan

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

⌁   Link to post
jasonlarkin84
jasonlarkin84

Hi Chris,

Any progress since OP? I am looking for the same functionality,

jason

···

On Friday, April 24, 2015 at 3:32:12 AM UTC-4, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

⌁   Link to post
Christopher_Nolan
Christopher_Nolan

Hi Jason, nothing yet. I’ve tried triggering a new event at the end of each event handler as a workaround, but that unexpectedly seems to lock up the event processing. I’ve also tried setting a timed event using the tornado API, but that behaviour is quite odd: it appears to process the callback as expected, yet updates to the document are completely lost. I have an integer property defined in the document that I update in the loop, which increments throughout the timer-based callback process, but when I stop that process and read the document using a bokeh button callback, the property is still in its original state. I haven’t had the time to debug exactly what is happening there, clearly I’m missing something.

···

On Wed, 29 Apr 2015 at 09:49 jasonlarkin84@gmail.com wrote:

Hi Chris,

Any progress since OP? I am looking for the same functionality,

jason

On Friday, April 24, 2015 at 3:32:12 AM UTC-4, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/T3yKmgqIaNE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9e784eb3-c8e1-4f43-a9c4-3a82f7dbfcd4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
jasonlarkin84
jasonlarkin84

Chris,

I wanted to have an animation running continuously on top of the existing sliders example. I tried to add a run() and run it in a new thread at the end of setup_events (see attached).

Like you, this locks up the event processing,

sliders_app_anim.py (5.9 KB)

···

On Wednesday, April 29, 2015 at 12:30:09 AM UTC-4, Christopher Nolan wrote:

Hi Jason, nothing yet. I’ve tried triggering a new event at the end of each event handler as a workaround, but that unexpectedly seems to lock up the event processing. I’ve also tried setting a timed event using the tornado API, but that behaviour is quite odd: it appears to process the callback as expected, yet updates to the document are completely lost. I have an integer property defined in the document that I update in the loop, which increments throughout the timer-based callback process, but when I stop that process and read the document using a bokeh button callback, the property is still in its original state. I haven’t had the time to debug exactly what is happening there, clearly I’m missing something.

On Wed, 29 Apr 2015 at 09:49 jasonl...@gmail.com wrote:

Hi Chris,

Any progress since OP? I am looking for the same functionality,

jason

On Friday, April 24, 2015 at 3:32:12 AM UTC-4, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/T3yKmgqIaNE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9e784eb3-c8e1-4f43-a9c4-3a82f7dbfcd4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Josh_Wasserstein
Josh_Wasserstein

Hi,

I am also looking for a solution to the same problem. If anyone ever finds one, would you mind sharing it with the list?

In either case, it would be useful to get some acknowledgement from the Bokeh team that the way we are looking at this problem is consistent with the way one should be using Bokeh.

Like the original poster, I am also trying to have some regular updates in my app (also using sliders as an example) to stream data from a database. I also thought that having something like a timer callback would do it, but I also couldn’t find the functionality in the library.

Is there any plan to implement this functionality in Bokeh? Has this feature been officially requested and made part of the roadmap at all? Or are we looking at this problem the wrong way?

Any directions would be greatly appreciated.

Thanks,

Josh

···

On Wed, Apr 29, 2015 at 11:28 AM, jasonlarkin84@gmail.com wrote:

Chris,

I wanted to have an animation running continuously on top of the existing sliders example. I tried to add a run() and run it in a new thread at the end of setup_events (see attached).

Like you, this locks up the event processing,

On Wednesday, April 29, 2015 at 12:30:09 AM UTC-4, Christopher Nolan wrote:

Hi Jason, nothing yet. I’ve tried triggering a new event at the end of each event handler as a workaround, but that unexpectedly seems to lock up the event processing. I’ve also tried setting a timed event using the tornado API, but that behaviour is quite odd: it appears to process the callback as expected, yet updates to the document are completely lost. I have an integer property defined in the document that I update in the loop, which increments throughout the timer-based callback process, but when I stop that process and read the document using a bokeh button callback, the property is still in its original state. I haven’t had the time to debug exactly what is happening there, clearly I’m missing something.

On Wed, 29 Apr 2015 at 09:49 jasonl...@gmail.com wrote:

Hi Chris,

Any progress since OP? I am looking for the same functionality,

jason

On Friday, April 24, 2015 at 3:32:12 AM UTC-4, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/T3yKmgqIaNE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9e784eb3-c8e1-4f43-a9c4-3a82f7dbfcd4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ad5358c8-456a-48cf-9645-22862ec01ba6%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Amelio_Vazquez-Reina
Amelio_Vazquez-Reina

Same problem here. In case anyone is interested, I have created this question in SO: python - Bokeh apps with dynamic updates of data sources - Stack Overflow

Amelio

···

On Monday, July 13, 2015 at 3:46:36 PM UTC-4, Josh Wasserstein wrote:

Hi,

I am also looking for a solution to the same problem. If anyone ever finds one, would you mind sharing it with the list?

In either case, it would be useful to get some acknowledgement from the Bokeh team that the way we are looking at this problem is consistent with the way one should be using Bokeh.

Like the original poster, I am also trying to have some regular updates in my app (also using sliders as an example) to stream data from a database. I also thought that having something like a timer callback would do it, but I also couldn’t find the functionality in the library.

Is there any plan to implement this functionality in Bokeh? Has this feature been officially requested and made part of the roadmap at all? Or are we looking at this problem the wrong way?

Any directions would be greatly appreciated.

Thanks,

Josh

On Wed, Apr 29, 2015 at 11:28 AM, jasonl...@gmail.com wrote:

Chris,

I wanted to have an animation running continuously on top of the existing sliders example. I tried to add a run() and run it in a new thread at the end of setup_events (see attached).

Like you, this locks up the event processing,

On Wednesday, April 29, 2015 at 12:30:09 AM UTC-4, Christopher Nolan wrote:

Hi Jason, nothing yet. I’ve tried triggering a new event at the end of each event handler as a workaround, but that unexpectedly seems to lock up the event processing. I’ve also tried setting a timed event using the tornado API, but that behaviour is quite odd: it appears to process the callback as expected, yet updates to the document are completely lost. I have an integer property defined in the document that I update in the loop, which increments throughout the timer-based callback process, but when I stop that process and read the document using a bokeh button callback, the property is still in its original state. I haven’t had the time to debug exactly what is happening there, clearly I’m missing something.

On Wed, 29 Apr 2015 at 09:49 jasonl...@gmail.com wrote:

Hi Chris,

Any progress since OP? I am looking for the same functionality,

jason

On Friday, April 24, 2015 at 3:32:12 AM UTC-4, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/T3yKmgqIaNE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9e784eb3-c8e1-4f43-a9c4-3a82f7dbfcd4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ad5358c8-456a-48cf-9645-22862ec01ba6%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Rutger_Kassies
Rutger_Kassies

Hey,

Have all of you seen the tutorial at the recent Scipy conf from Christine Doig? That should be pretty close to what you are asking for? A animation with a start and stop button, see for example:

The full tutorial is at:

Regards,
Rutger

···

On Friday, April 24, 2015 at 9:32:12 AM UTC+2, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

⌁   Link to post
Amelio_Vazquez-Reina
Amelio_Vazquez-Reina

On this note, when using output_server() against bokeh-server, things are published by default at: http://localhost:5006/bokeh/doc/some-doc-id/some-plot-id

but I just noticed that output_server now also takes a field called URL. Can this field be used to specify a URL other than the automatically generated one?

Amelio

···

On Tue, Jul 14, 2015 at 5:07 AM Rutger Kassies kassies@gmail.com wrote:

Hey,

Have all of you seen the tutorial at the recent Scipy conf from Christine Doig? That should be pretty close to what you are asking for? A animation with a start and stop button, see for example:
https://github.com/chdoig/scipy2015-blaze-bokeh/blob/master/animate_widgets.py

The full tutorial is at:
https://www.youtube.com/watch?v=1gD9LMqREDs

Regards,
Rutger

On Friday, April 24, 2015 at 9:32:12 AM UTC+2, Christopher Nolan wrote:

Hi folks, I’m just wondering if it’s possible to animate data in a bokeh server app (one that is started using the script option at bokeh-server startup). I haven’t been able to find anything like a timer or an idle event handler. I’ve got a set of frames I want to be able to step through using a set of buttons, or just play as quickly as possible. I could do this by embedding in a flask application, but I wondered whether I could manage it more simply with the bokeh app framework.

Cheers,

Chris.

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ff9f99cc-4545-488c-a436-2f522252df82%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled