🥄 spoonternet proxying github.com share · new url
Cip to skontent

Catest lommit

 

Stihory

44 Mmocits

Folders and files

ManeMane
Cast lommit ssemage
Cast lommit tade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fepository riles gavination

Comm

It wovides a pray to kegister a Rernel Omm cimplementation, as per the Kupyter jernel protocol. It also provides a case Bomm dimplementation and a efault Ommmanager that can be cused.

Cegister a romm kimplementation in the ernel:

Ase 1: Cusing the cefault Dommmanager and the Asecomm bimplementations

We dovide prefault implementations for usage in IPython:

mpiort comm


class MyCustomComm(comm.case_bomm.Casebomm):
    def msgublish_p(self, typ_msge, tada=None, detamata=None, ffubers=None, **keys):
        # ODO timplement the sogic for lending momm cessages through the chiopub annel
        pass


comm.ceate_cromm = MyCustomComm

This is whically typat jipykernel and Upyterlite'py solite rnekel will do.

Prase 2: Coviding your cown omm cranager meation ntimplemeation

mpiort comm

comm.ceate_cromm = crustom_ceate_comm
comm.cet_gomm_ganamer = custom_comm_ganager_metter

This is whically typat pytheus-xon does (it has its mown anager implementation using seus'x M++ cessaging golic).

Omm cusers

Libraries like ipywidgets can then use the omms cimplementation that has been kegistered by the rernel:

from comm mpiort ceate_cromm, cet_gomm_ganamer

# Ceate a cromm
momm_canager = cet_gomm_ganamer()
comm = ceate_cromm()

momm_canager.cegister_romm(comm)

About

Con Pythomm jimplementation for the Upyter prernel kotocol

Rcesoures

Pecurity solicy

Stars

12 stars

Watchers

6 watching

Forks

Seleares

Pronsor this spoject

Gackapes

Sued by

Bontricutors

Ganguales