Skip to content

CodeLabClub/codelab_adapter_client_python

 
 

Repository files navigation

codelab_adapter_client

Python Client of CodeLab Adapter v3.

Install

# Python >= 3.6
pip install codelab_adapter_client 

Usage

from codelab_adapter_client import AdapterNode

example

extension_eim.py

tools(for debugging)

codelab-message-monitor # subscribes to all messages and print both topic and payload.
codelab-message-trigger # pub the message in json file(`/tmp/message.json`).
codelab-message-pub -j '{"topic":"eim/test","payload":{"content":"test contenst"}}'

/tmp/message.json:

{
  "topic": "adapter_core/exts/operate",
  "payload": { "content": "start", "node_name": "extension_eim" }
}

FAQ

在 Adapter jupyterlab 中升级 codelab_adapter_client

import pip
pip.main(['install', 'https://github.com/CodeLabClub/codelab_adapter_client_python/archive/master.zip'])
# 安装完成后在jupyterlab restart 一下 kernel

EIM message

与 Scratch EIM 积木配合使用

from codelab_adapter_client.message import receive_message, send_message

About

Python Client of CodeLab Adapter v2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.8%
  • Makefile 2.2%