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.1.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.1.0
File Size Uploaded
nitro_intercom-0.1.0.tar.gz 43.9 kB Details

Built distributions (wheels)

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

Download URL nitro_intercom-0.1.0.tar.gz
Size 43.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1f26b940792f562e57465567ae667b4a84fec0313a12f77bc0b6facf15dce878
BLAKE2b-256 checksum
How to use checksums
5ccf0ba4289f91f8166dd6355d857df879115bdcc9d52c3b0ac5434d7b8c3bb6
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 Aug 20, 2026.

Transparency log

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

Download URL nitro_intercom-0.1.0-cp313-abi3-win_amd64.whl
Size 997.6 kB
Tags CPython 3.13 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
29b1421351cad06910f8c379270590edf6664fa4e5e6aaefb230a6ba196c0361
BLAKE2b-256 checksum
How to use checksums
7ca26a4237e289dc8503fa5e45c7a3e0f56aaa77ad8bba0bdea19d6c4fe8fc75
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 Aug 20, 2026.

Transparency log

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

Download URL nitro_intercom-0.1.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
32e9c1682100f90e826d244d31e95d385e2fae76e155915efcb08505922d2c99
BLAKE2b-256 checksum
How to use checksums
ce4a29be6ce2ec456a90660aceeb0032b20c0c9583a064b3a853abe2ae88d622
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 Aug 20, 2026.

Transparency log

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

Download URL nitro_intercom-0.1.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
e1256885efacd993043b0d228815f77f674a1a7a01658fa1418c4169c15792e9
BLAKE2b-256 checksum
How to use checksums
609eae66a668912e210b72ab3133fc040c683da2337e16e390b8d0c02ec0ac7e
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 Aug 20, 2026.

Transparency log

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

Download URL nitro_intercom-0.1.0-cp313-abi3-macosx_11_0_arm64.whl
Size 982.6 kB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
427c9ee3aea21390da3da483e5e94d51c2c673e8b2e93749b0c40bddb6ca53b7
BLAKE2b-256 checksum
How to use checksums
88e2943981d3364a5e6522d73b6b61259cc0bdee62bc6987102f3a70d7270a13
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 Aug 20, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

5 release files

0.3.0

5 release files

0.2.0

5 release files

This release

0.1.0 This release

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