MCPcopy Create free account
hub / github.com/holoviz/hvplot / StreamingCallable

Class StreamingCallable

hvplot/converter.py:96–130  ·  view source on GitHub ↗

StreamingCallable is a DynamicMap callback wrapper which keeps a handle to start and stop a dynamic stream.

Source from the content-addressed store, hash-verified

94
95
96class StreamingCallable(Callable):
97 """
98 StreamingCallable is a DynamicMap callback wrapper which keeps
99 a handle to start and stop a dynamic stream.
100 """
101
102 periodic = param.Parameter()
103
104 def clone(self, callable=None, **overrides):
105 """
106 Allows making a copy of the Callable optionally overriding
107 the callable and other parameters.
108 """
109 old = {k: v for k, v in self.param.values().items() if k not in ['callable', 'name']}
110 params = dict(old, **overrides)
111 callable = self.callable if callable is None else callable
112 return self.__class__(callable, **params)
113
114 def start(self):
115 """
116 Start the periodic callback
117 """
118 if not self.periodic._running:
119 self.periodic.start()
120 else:
121 raise Exception('PeriodicCallback already running.')
122
123 def stop(self):
124 """
125 Stop the periodic callback
126 """
127 if self.periodic._running:
128 self.periodic.stop()
129 else:
130 raise Exception('PeriodicCallback not running.')
131
132
133class HoloViewsConverter:

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…