comm
Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc.
Description
# Comm It provides a way to register a Kernel Comm implementation, as per the Jupyter kernel protocol. It also provides a base Comm implementation and a default CommManager that can be used. ## Register a comm implementation in the kernel: ### Case 1: Using the default CommManager and the BaseComm implementations We provide default implementations for usage in IPython: ```python import comm class MyCustomComm(comm.base_comm.BaseComm): def publish_msg(self, msg_type, data=None, metadata=None, buffers=None, **keys): # TODO implement the logic for sending comm messages through the iopub channel pass comm.create_comm = MyCustomComm ``` This is typically what ipykernel and JupyterLite's pyolite kernel will do. ### Case 2: Providing your own comm manager creation implementation ```python import comm comm.create_comm = custom_create_comm comm.get_comm_manager = custom_comm_manager_getter ``` This is typically what xeus-python does (it has its own manager implementation using xeus's C++ messaging logic). ## Comm users Libraries like ipywidgets can then use the comms implementation that has been registered by the kernel: ```python from comm import create_comm, get_comm_manager # Create a comm comm_manager = get_comm_manager() comm = create_comm() comm_manager.register_comm(comm) ```
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 0.2.3 | Imported from PyPI (0.2.3) | Low | 4/21/2026 |
| v0.2.3 | ## 0.2.3 ([Full Changelog](https://github.com/ipython/comm/compare/v0.2.2...ec3eb438c07314b47c057c1cc3ce5fe43c294e90)) ### Merged PRs - Remove `traitlets` dependency [#32](https://github.com/ipython/comm/pull/32) ([@davidbrochart](https://github.com/davidbrochart)) - Add Security.md file. [#29](https://github.com/ipython/comm/pull/29) ([@Carreau](https://github.com/Carreau)) - pre-commit updates and fixes [#28](https://github.com/ipython/comm/pull/28) ([@Carreau](https://github.com/Carreau) | Low | 7/25/2025 |
| v0.2.2 | ## 0.2.2 ([Full Changelog](https://github.com/ipython/comm/compare/v0.2.1...76149e7ee0f331772c964ae86cdb8bafebe6dfa2)) ### Maintenance and upkeep improvements - Update Release Scripts [#27](https://github.com/ipython/comm/pull/27) ([@blink1073](https://github.com/blink1073)) ### Other merged PRs - chore: update pre-commit hooks [#26](https://github.com/ipython/comm/pull/26) ([@pre-commit-ci](https://github.com/pre-commit-ci)) ### Contributors to this release ([GitHub contributors page f | Low | 3/12/2024 |
| v0.2.1 | ## 0.2.1 ([Full Changelog](https://github.com/ipython/comm/compare/v0.2.0...46e07dc298d19c1b7ade765d0a435f794e69a020)) ### Maintenance and upkeep improvements - Update ruff config [#23](https://github.com/ipython/comm/pull/23) ([@blink1073](https://github.com/blink1073)) ### Other merged PRs - chore: update pre-commit hooks [#25](https://github.com/ipython/comm/pull/25) ([@pre-commit-ci](https://github.com/pre-commit-ci)) - Prevent exception spam during interpreter teardown [#24](https:// | Low | 1/2/2024 |
| v0.2.0 | ## 0.2.0 ([Full Changelog](https://github.com/ipython/comm/compare/v0.1.4...5e4ad3166b80feba3f74ad074b7b5f98d7a99439)) ### Maintenance and upkeep improvements - Add downstream checks [#20](https://github.com/ipython/comm/pull/20) ([@blink1073](https://github.com/blink1073)) - Adopt sp-repo-review [#19](https://github.com/ipython/comm/pull/19) ([@blink1073](https://github.com/blink1073)) ### Other merged PRs - Bump actions/checkout from 3 to 4 [#17](https://github.com/ipython/comm/pull/17) | Low | 11/6/2023 |
| v0.1.4 | ## 0.1.4 ([Full Changelog](https://github.com/ipython/comm/compare/v0.1.3...136c099e4fb1cc83040661796ad7ea349af04be8)) ### Improvements - Loosen dependency on traitlet so it is available in python 3.6 [#16](https://github.com/ipython/comm/pull/16) ([@vincent-grosbois](https://github.com/vincent-grosbois)) ### Contributors to this release ([GitHub contributors page for this release](https://github.com/ipython/comm/graphs/contributors?from=2023-03-22&to=2023-08-02&type=c)) [@ | Low | 8/2/2023 |
| v0.1.3 | ## 0.1.3 ([Full Changelog](https://github.com/ipython/comm/compare/0.1.2...309b8295ca950a9ca9bdc0daa796215d72a7cb09)) ### Maintenance and upkeep improvements - Adopt linters and releaser [#12](https://github.com/ipython/comm/pull/12) ([@blink1073](https://github.com/blink1073)) ### Other merged PRs - feat: provide a default implementation [#13](https://github.com/ipython/comm/pull/13) ([@maartenbreddels](https://github.com/maartenbreddels)) ### Contributors to this release ([GitHub cont | Low | 3/22/2023 |
