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.0

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.0
File Size Uploaded
nitro_intercom-0.3.0.tar.gz 43.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for nitro-intercom 0.3.0
File
nitro_intercom-0.3.0-cp313-abi3-win_amd64.whl CPython 3.13 abi3 Windows x86-64 Details
nitro_intercom-0.3.0-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.0-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 abi3 Linux glibc 2.17+ ARM64 Details
nitro_intercom-0.3.0-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.0.tar.gz

Download URL nitro_intercom-0.3.0.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bc8ad40be28e2364a31d56668b521b5d87ab6c7699049f1ed40596e1083721c4
BLAKE2b-256 checksum
How to use checksums
700d8f7300ea3a47cdde16316f5298f0f4ff74f7732c1f6aa2332e4691be021c
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 Sep 22, 2026.

Transparency log

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

Download URL nitro_intercom-0.3.0-cp313-abi3-win_amd64.whl
Size 996.4 kB
Tags CPython 3.13 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f6198adc77a908803077e121ac47504381ee0c09fa95fd0fd978c8ecebb7309a
BLAKE2b-256 checksum
How to use checksums
f381df428e957152160f93503e94108c9bfca10f3c10b04325965ae4b3d7652c
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 Sep 22, 2026.

Transparency log

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

Download URL nitro_intercom-0.3.0-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
efb3a9bc4a3a8f28af4ba4fb0f1a8dba974c2a28731304a7739a106ca4c398d1
BLAKE2b-256 checksum
How to use checksums
f5b52e923880c1268a17b1e63344095e3d8845b532534f131d15b49d30c61668
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 Sep 22, 2026.

Transparency log

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

Download URL nitro_intercom-0.3.0-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
6ad448962e8619e7a797278ca9f91227a5d72c7d978dda107c3a7a7eab3fe097
BLAKE2b-256 checksum
How to use checksums
d65bd9dd7df06f7cf2d34b337e5bfdcfd2d45b7713726a5dbb2e2a6a1b7b35a7
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 Sep 22, 2026.

Transparency log

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

Download URL nitro_intercom-0.3.0-cp313-abi3-macosx_11_0_arm64.whl
Size 982.5 kB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6360ec4d96ed75c89be34d5e17e8983b22a94191d7312e55bc604d0734c21938
BLAKE2b-256 checksum
How to use checksums
ec54d5ec6871036be8de2678bb4a31434b56074db10461dd519a54c90d6aafb0
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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

5 release files

This release

0.3.0 This release

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