--- id: asyncio-dgram version: "3.0.0" license: MIT license_treatment: permissive maintenance: active --- # asyncio-dgram — Higher level Datagram support for Asyncio License: permissive · Maintenance: active · Downloads: 184.4K/mo ## What it is and what it does asyncio-dgram wraps asyncio's lower-level datagram protocol machinery to let you use simple async/await patterns for UDP communication. Instead of subclassing asyncio.DatagramProtocol and implementing callbacks, you call three straightforward functions—connect() for point-to-point communication, bind() for listening to multiple sources, or from_socket() for custom socket setup—then await send() and recv() calls directly. The package is designed around common UDP patterns and avoids exposing the full complexity of asyncio's create_datagram_endpoint. It has no runtime dependencies, supports Python 3.9 through 3.14, and is actively maintained. The API is opinionated but intentionally simple: you get what most datagram use cases need without the flexibility overhead. Use it for: - Building UDP echo servers or clients that need clean async/await syntax instead of protocol callbacks. - Implementing DNS query clients or other request-response UDP patterns with simple send-and-receive logic. - Creating lightweight UDP-based monitoring or telemetry collectors that handle multiple remote sources. - Prototyping or teaching async network programming without the boilerplate of DatagramProtocol subclassing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides simple async/await wrappers for UDP datagram communication, letting you read from and send to datagram endpoints without inheriting from asyncio.DatagramProtocol. Yes. Low friction, no dependencies, actively maintained, MIT-licensed, and solves a real pain point in asyncio's datagram API. Install it if you need to do UDP communication in an async context and want to avoid writing boilerplate protocol classes. ## Install pip install asyncio-dgram uv add asyncio-dgram poetry add asyncio-dgram ## Installing asyncio-dgram Before you install: Low install friction; no runtime dependencies. Actively maintained with recent releases and a stable codebase. License in practice: MIT license permits commercial and private use with minimal restrictions. Quickstart: import asyncio import asyncio_dgram async def example(): stream = await asyncio_dgram.connect(("127.0.0.1", 8888)) await stream.send(b"Hello") data, addr = await stream.recv() stream.close() asyncio.run(example()) Requires Python 3.9 or later. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 184.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags async udp datagram, asyncio datagram support, await read udp, async datagram client server, asyncio dgram wrapper, udp async await, datagram asyncio, async-networking, udp [View on SkillFed](https://skillfed.io/packages/asyncio-dgram) · [View on PyPI](https://pypi.org/project/asyncio-dgram/)