Liking cljdoc? Tell your friends :D

clojupyter.kernel.comm-atom

Implements support for Jupyter COMM objects which is the mechanism for synchronizing state between Jupyter clients (Notebook, Lab, others) and kernels such as Clojupyter. COMM objects serve as the basis for interactive controls such as ipywidgets.

Implements support for Jupyter COMM objects which is the mechanism for synchronizing state between
Jupyter clients (Notebook, Lab, others) and kernels such as Clojupyter.  COMM objects serve as the
basis for interactive controls such as ipywidgets.
raw docstring

comm-atom-protocljprotocol

comm-idclj

(comm-id comm-atom)

The Jupyter protocol ID of the COMM-ATOM.

The Jupyter protocol ID of the COMM-ATOM.

model-refclj

(model-ref comm-atom)

The COMM-ATOM's Jupyter Model reference identifier (a string).

The COMM-ATOM's Jupyter Model reference identifier (a string).

origin-messageclj

(origin-message comm-atom)

The message that caused the COMM-ATOM to be created.

The message that caused the COMM-ATOM to be created.

state-set!clj

(state-set! comm-atom comm-state)

Sets the value comm-atom to be comm-state by updating the global state and sending COMM update message. comm-state must be a map serializable to JSON. Returns comm-atom.

Sets the value `comm-atom` to be `comm-state` by updating the global state and sending COMM `update`
message.  `comm-state` must be a map serializable to JSON.  Returns `comm-atom`.

state-update!clj

(state-update! comm-atom comm-state)

Merges comm-state into current value of comm-atom.

Merges `comm-state` into current value of `comm-atom`.

targetclj

(target comm-atom)

The Jupyter target name to which the COMM-ATOM belongs.

The Jupyter target name to which the COMM-ATOM belongs.

unwatchclj

(unwatch comm-atom key)

Remove watch added with key key from comm-atom. Returns comm-atom.

Remove watch added with key `key` from `comm-atom`.  Returns `comm-atom`.

watchclj

(watch comm-atom key fn)

Add watch to comm-atom which will subsequently be called when the value of comm-atom is updated. The observer fn fn must be a fn of 4 args: a key, the reference, its old-state, its new-state, identical to those for watch functions (internally CommAtom uses an agent for update notification), cf. add-watch for details. Returns comm-atom.

Add watch to `comm-atom` which will subsequently be called when the value of `comm-atom` is
updated.  The observer `fn` fn must be a fn of 4 args: a key, the reference, its old-state, its
new-state, identical to those for `watch` functions (internally CommAtom uses an agent for
update notification), cf. `add-watch` for details.  Returns `comm-atom`.
source

comm-atom?clj

source

createclj

(create jup req-message target-name comm-id comm-state)
source

create-and-insertclj

(create-and-insert jup req-message target-name comm-id comm-state)
source

insertclj

(insert comm-atom)
source

MESSAGE-METADATAclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close