title: How can I select a bokeh circle glyphs with a python callback?
body: <p>I am running a bokeh server with a simple circle glyph and a TapTool to select individual circles.</p>
  
  <p>Now I want to have a button to select all glyphs and update the selection in the plot.</p>
  
  <p>Here is my atempt:</p>
  
  <pre><code>from bokeh import plotting as bplt
  from bokeh import layouts as blayouts
  from bokeh import models as bmodels
  from bokeh import io as bio
  from bokeh.server.server import Server
  
  fig = bplt.figure(tools="tap")
  
  source = bmodels.ColumnDataSource(dict(x=[0,1], y=[0,1]))
  
  r = fig.circle('x', 'y', source=source, size=10)
  
  def handler(attr, old, new):
      print('attr: {} old: {} new: {}'.format(attr, old, new))
  
  # r.data_source.on_change('selected', handler)
  r.data_source.selected.on_change('indices', handler)
  
  button = bmodels.Button(label="select all", button_type="success", width=200)
  
  def callback(event):
      '''Here I would like to select all points in the plot with python code'''
  
      # this is my atempt:
      print('event: {}'.format(event))
      print('data source selected:', r.data_source.selected.indices)
  
      r.data_source.selected.indices = [0]
  
      print('data source selected:', r.data_source.selected.indices)
  
  button.on_click(callback)
  
  def modify(doc):
      layout = blayouts.row(fig, button)
      doc.add_root(layout)
      doc.title = "title"
      print('modify', type(doc))
  
  if __name__ == '__main__':
      print('Opening Bokeh application on http://localhost:5006/')
      server = Server({'/': modify}, num_procs=1)
      server.start()
      server.io_loop.add_callback(server.show, "/")
      server.io_loop.start()
  </code></pre>
  
  <p>You can run the example just by using:</p>
  
  <pre><code>python3 example_code.py
  </code></pre>
  
  <p>My question now is the following: How can I select all Bokeh circle glyphs with a python callback identically to when I would select the same glyphs with the TapTool manually?</p>