Skip to main content

nitro-intercom

Publish/subscribe channels for Python services, backed by the same Rust core the Nitro framework uses internally.

Installation

pip install nitro-intercom

Python 3.13 or newer. The distribution is named nitro-intercom; the package it installs is nitro_intercom, which is what you import. The wheel carries the compiled core, so there is nothing to build. Redis is what it connects to, not something it installs.

Install this only if you are not running on Nitro. Nitro projects should import nitro.intercom, which reaches the same core in-process and takes its configuration from the project's settings object instead of a separate config surface.

Connecting

from nitro_intercom import Intercom

intercom = await Intercom.connect("redis://localhost:6379", prefix="myapp")

prefix keeps several applications apart on one server. capacity and expiry apply to queued channels.

Two ways to deliver

publish / subscribe is push delivery. A subscriber connected now gets the message immediately; one that is not never learns of it.

reached: int = await intercom.publish("room:42", {"event": "joined", "user": "ada"})

listener = await intercom.subscribe("room:42")
async for message in listener:
    print(message)
await listener.close()

send / receive is a bounded queue. A message waits until it is read or the channel expires, and the oldest is discarded once the channel is full.

await intercom.send("jobs", {"task": "resize", "id": 7})

message = await intercom.receive("jobs")        # None when empty

reader = await intercom.reader("jobs")
message = await reader.receive(timeout=30)      # waits; 0 waits indefinitely

Groups

A group is a named set of channels, so a message can be addressed to "everyone in room 42" without the sender knowing who that is.

await intercom.group_add("room:42", channel)
await intercom.group_discard("room:42", channel)

members: list[str] = await intercom.group_channels("room:42")

await intercom.group_publish("room:42", {"event": "started"})   # to those listening
await intercom.group_send("room:42", {"event": "started"})      # queued for each

What crosses the wire

None, bool, int, float, str, bytes, list, tuple and dict, encoded as MessagePack so a service written in another language can read them. Tuples arrive as lists. Anything else is refused rather than coerced, because guessing would mean the receiver gets something the sender did not mean to send.

License

Licensed under either of Apache License, Version 2.0 or the MIT license, at your option.

Metadata

Release files for nitro-intercom 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nitro-intercom 0.3.1
File Size Uploaded
nitro_intercom-0.3.1.tar.gz 43.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for nitro-intercom 0.3.1
File
nitro_intercom-0.3.1-cp313-abi3-win_amd64.whl CPython 3.13 abi3 Windows x86-64 Details
nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 abi3 Linux glibc 2.17+ x86-64 Details
nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 abi3 Linux glibc 2.17+ ARM64 Details
nitro_intercom-0.3.1-cp313-abi3-macosx_11_0_arm64.whl CPython 3.13 abi3 macOS 11.0+ ARM64 Details

Total release size: 4.2 MB

Release files / nitro_intercom-0.3.1.tar.gz

Download URL nitro_intercom-0.3.1.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
89eb9c6d19f1eb59ab7dd33bb7361cf16cc106bbdf93b0929cb8cd0f6e45a597
BLAKE2b-256 checksum
How to use checksums
a2a809f722d271c9cf13c32be2bcf61eb9a58963bb166429d70820656b9bcdb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / nitro_intercom-0.3.1-cp313-abi3-win_amd64.whl

Download URL nitro_intercom-0.3.1-cp313-abi3-win_amd64.whl
Size 995.1 kB
Tags CPython 3.13 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
205b31064d550270e927d57179d646ffc46e5bf05741ad2d8e21fef247f40d48
BLAKE2b-256 checksum
How to use checksums
90977bffef46379fdd82da7d670ca726c03a2ad8f121457cd53b74ea9719cf77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a3f816645afb6f600b3d3fa1a72f9e761b2f164505d3338708f27d46d0652191
BLAKE2b-256 checksum
How to use checksums
00d0d150b0284ea018a02f6235dc3542ca97c3f09bdbe7169c295d0be62dd475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nitro_intercom-0.3.1-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
52a5d15cd15b565556573d66da608de50049f47f25b1e27ae433c18776fb689f
BLAKE2b-256 checksum
How to use checksums
b200f0604edbd4e14a252c7bd3ea8c3ec9dc0cb72898bb8ac7ebdf6fb65072b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / nitro_intercom-0.3.1-cp313-abi3-macosx_11_0_arm64.whl

Download URL nitro_intercom-0.3.1-cp313-abi3-macosx_11_0_arm64.whl
Size 985.5 kB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b76982d768ea08c0dd1d151921c48944275fc30a4ca640df2eb26f0b16a62152
BLAKE2b-256 checksum
How to use checksums
def5758961758d8ece1cfd70982ddb665e513dc268e1ee9f5b110092c607bcf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

5 release files

0.3.0

5 release files

0.2.0

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page