ipython-kernel-0.10.3.0: A library for creating kernels for IPython frontends
Safe HaskellSafe-Inferred
LanguageHaskell2010

IHaskell.IPython.ZeroMQ

Description

The ZeroMQ module abstracts away the low-level 0MQ based interface with IPython, replacing it instead with a Haskell Channel based interface. The serveProfile function takes a IPython profile specification and returns the channel interface to use.

Synopsis

Documentation

data ZeroMQInterface Source #

The channel interface to the ZeroMQ sockets. All communication is done via Messages, which are encoded and decoded into a lower level form before being transmitted to IPython. These channels should functionally serve as high-level sockets which speak Messages instead of ByteStrings.

Constructors

Channels 

Fields

serveProfile Source #

Arguments

:: Profile

The profile specifying which ports and transport mechanisms to use.

-> Bool

Print debug output

-> IO ZeroMQInterface

The Message-channel based interface to the sockets.

Start responding on all ZeroMQ channels used to communicate with IPython | via the provided profile. Return a set of channels which can be used to | communicate with IPython in a more structured manner.

data ZeroMQEphemeralPorts Source #

Describes ports used when creating an ephemeral ZeroMQ session. Used to generate the ipython JSON config file.

withEphemeralPorts Source #

Arguments

:: ByteString

HMAC encryption key

-> Bool

Print debug output

-> (ZeroMQEphemeralPorts -> ZeroMQInterface -> IO a)

Callback that takes the interface to the sockets.

-> IO a 

Run session for communicating with an IPython instance on ephemerally allocated ZMQ4 sockets. The sockets will be closed when the callback returns.