Skip to main content

zapchat (Python)

Terminal-native LAN chat. No accounts, no cloud, no servers — just your local network.

This is the Python distribution of zapchat. It speaks the same discovery protocol as the Node.js version, so a Python user and an npm user on the same Wi-Fi can chat with each other.

The Python client runs the proven protocol v1 wire format (JSON envelopes over TCP, discovery beacons). The Node.js client's protocol v2 adds TLS-style encryption on top of the same envelope shapes. Since zapchat v5 the stacks see each other's discovery beacons again, and an npm peer that runs with --allow-plaintext will chat with you over an unencrypted v1 link (the npm side warns loudly about this). npm ↔ npm links stay end-to-end encrypted; if the npm user does not opt in, no cross-stack link is opened.

Install

pip install zapchat

Run

zapchat

That is it. Everyone on the same network who runs zapchat shows up automatically, and you can start chatting.

zapchat 3.0.0 — LAN chat, no accounts, no server
  you are sam on #general (tcp:45913)
  waiting for people on this network... (ctrl+c to quit, /help)
* alex connected
10:24 alex: morning all
10:25 sam: morning! which room are we using today?

Commands

Command What it does
/help Show the command list
/rooms Rooms discovered on the LAN
/users /who Who is on the LAN and connected
/join <room> Join a room (created if nobody is in it)
/name <username> Change your display name
/me <action> Send an action message: /me waves → * sam waves
/connect <ip[:port]> Connect straight to a peer when discovery is blocked
/status Discovery state, ports, peers
/quit Exit

How it works

  • Every instance sends a small UDP beacon (multicast + subnet broadcast) announcing its username, room and TCP port.
  • Beacons are how instances find each other; then they open direct TCP connections and exchange newline-delimited JSON messages.
  • Rooms are derived, not stored: a room exists while somebody is in it.
  • There is no server of any kind. If the LAN works, zapchat works.

Works with the npm version of zapchat on the same network (same beacons, same message protocol). Actions (/me) use the same CTCP-style framing as the npm client, so an npm user sees * sam waves exactly like a Python user does.

Privacy

  • No accounts, no telemetry, no cloud: the only network traffic is UDP beacons and TCP messages on your local network.
  • Config is one small JSON file (your username, a random client id, the last room). Chat history stays in memory.
  • Messages are plain text on your LAN — anyone who can capture that traffic can read it. For sensitive conversations use an encrypted messenger.

Requirements

  • Python 3.9+ (standard library only — zero dependencies)
  • Python 3.9+ on any OS: Windows, macOS, Linux

License

MIT © Samarth Chugh (Sam3360)

Metadata

Release files for zapchat 5.0.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 zapchat 5.0.0
File Size Uploaded
zapchat-5.0.0.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zapchat 5.0.0
File Interpreter ABI Platform
zapchat-5.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.2 kB

Release files / zapchat-5.0.0.tar.gz

Download URL zapchat-5.0.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2bbd1b152dc97cc88c2a25e31dd6e348712e821dd1b891aa5dc9726b0e906f30
BLAKE2b-256 checksum
How to use checksums
cd52b3f77dd33f1ca8a69092a61e342eadb5622ae0ce91f5b366ca23302a22fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / zapchat-5.0.0-py3-none-any.whl

Download URL zapchat-5.0.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e28ae22b3c241b6a3e6a5c4a0af801e4382ec6db34273bfb08602616f07f504e
BLAKE2b-256 checksum
How to use checksums
155191f40b6d1c4fcb463ce5872b1cb36338999280e96c1f01e04b5bc308eb33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

7.0.1

2 release files

7.0.0

2 release files

6.0.0

2 release files

This release

5.0.0 This release

2 release files

4.0.0

2 release files

3.0.0

2 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