Skip to main content

multicast.py

Low-to-mid level wrapper for multicast sockets. Simple and cross-platform.

The library is typed, but if you want: DOCS HERE.

Installation

pip install multicast_py

Usage

Creation socket to send multicast packets:

s = MulticastSocket()
s.multicast_ttl = 2  # if needed
s.multicast_loop = False  # if needed, POSIX only (on Windows does nothing)
s.set_multicast_if(address='192.168.0.101')  # local ip, used almost always

s.sendto(b'Multicast message', (group_address, group_port))  # send multicast message

Creation socket to receive multicast packets:

s = MulticastSocket()
s.reuse_addr = True  # if needed
s.multicast_loop = False  # if needed, Windows only (on POSIX does nothing)
s.bind_multicast((group_address, group_port))
s.add_membership(group_address)  # also can specify local address

data = s.recvfrom(1024)  # receive multicast message

License

MIT License. Full test available in LICENSE file.

Metadata

Release files for multicast-py 1.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 multicast-py 1.0.0
File Size Uploaded
multicast_py-1.0.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multicast-py 1.0.0
File Interpreter ABI Platform
multicast_py-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / multicast_py-1.0.0.tar.gz

Download URL multicast_py-1.0.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a63ecbdb35ba95172b59b0afa8db13ac9230840dde4ed84c4e7da13d450ae026
BLAKE2b-256 checksum
How to use checksums
2d33ad7bc81cc159f5051774d4276d88f3f27c59693702b25966419fde144849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / multicast_py-1.0.0-py3-none-any.whl

Download URL multicast_py-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86df83cff349adaf28638bf2714f2d8b2569821f95f899a58ef1354bd3d2cff6
BLAKE2b-256 checksum
How to use checksums
69712a57629f30da3a14bbe7ae6407db988ffce5b260ea902e60ab92a56beaa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

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