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.2.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.2.0
File Size Uploaded
nitro_intercom-0.2.0.tar.gz 43.8 kB Details

Built distributions (wheels)

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

Download URL nitro_intercom-0.2.0.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1e72731166013c58cbbf33e3e4bfae123f6f303970f1eeed2fe2b357d3409da4
BLAKE2b-256 checksum
How to use checksums
66a44d70758d13ffdbf7b25118eb7b993c0cd8f35e6af519096fd38770f95c8b
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 18, 2026.

Transparency log

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

Download URL nitro_intercom-0.2.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
305f124cc94afdc35ac01498006fdf4c23adc576304203e681e90f6fb5a10ba9
BLAKE2b-256 checksum
How to use checksums
9ea45c98cf5252c1c5f9b31718819db3cb95e5f9b5079ad7ee5fcc834a460199
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 18, 2026.

Transparency log

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

Download URL nitro_intercom-0.2.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
45339ad67edccee545c56d3e2d86cfeef2dde00ea7bdc021d4d8bf88009f3378
BLAKE2b-256 checksum
How to use checksums
b2d532352f05d415a2f02c5f048c918ea32cb6ee56135a33a86e32318d6280db
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 18, 2026.

Transparency log

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

Download URL nitro_intercom-0.2.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
70a10ac4a3d51d5bc29a77dcdd75c7f43079b68737d9fb3dec23678c37b65be7
BLAKE2b-256 checksum
How to use checksums
effa3c1bd842067f9c92b91422e46650cd82cfd71306c0ccb54942c16dfff6a1
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 18, 2026.

Transparency log

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

Download URL nitro_intercom-0.2.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
e128d4cd05a207ae1dcf381ae9467daeaae1532dcd685d2071219e04ae14e29d
BLAKE2b-256 checksum
How to use checksums
f82a5dafd7fc155b91219d93ef81ad911b52ecb34301325866c57568fb001b86
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

5 release files

0.3.0

5 release files

This release

0.2.0 This release

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