--- id: python3-dtls version: "1.3.0" license: Apache-2.0 license_treatment: permissive maintenance: dormant --- # python3-dtls — Python Datagram Transport Layer Security License: permissive · Maintenance: dormant · Downloads: 213.8K/mo ## What it is and what it does PyDTLS brings DTLS (RFC 6347) to Python by patching the standard library's ssl module to handle UDP datagram sockets the same way it handles TCP streams. It provides encryption, server and user authentication, and message authentication for UDP-based communication. The package is pure Python and interfaces with OpenSSL through ctypes, making it portable across operating systems. The library implements DTLS connection semantics on top of connectionless UDP by managing handshakes, cookie exchanges (to prevent denial-of-service attacks), and demultiplexing of datagrams to the correct peer connection. You can use either the familiar ssl module interface (after calling do_patch) or the lower-level SSLConnection class directly. Version 1.3.0 adds support for DTLS 1.2, forward secrecy via elliptic curve cryptography, and finer-grained configuration. Use it for: - Securing real-time communication protocols (VoIP, video streaming, gaming) where UDP latency is critical and TLS over TCP is too slow. - Protecting IoT device communication where bandwidth and latency constraints make UDP preferable to TCP. - Building DTLS-compliant servers that must authenticate clients and prevent spoofing attacks via the DTLS cookie exchange. - Migrating existing UDP applications to encrypted communication without rewriting socket code—use do_patch to extend ssl module. - Testing DTLS implementations or building DTLS-aware network tools in pure Python. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds DTLS (Datagram Transport Layer Security) support to Python by extending the standard library's ssl module to work with UDP sockets, providing encryption and authentication for datagram-based communication. Yes, if you need DTLS for UDP communication and can accept dormant maintenance. The package is stable (Production/Stable classifier), has no known vulnerabilities, and low install friction. However, do not use it if you require active security updates or compatibility with Python versions beyond 3.6—the last release was 2020-11-06 and the repository shows no recent activity. ## Install pip install python3-dtls uv add python3-dtls poetry add python3-dtls ## Installing python3-dtls Before you install: Low friction: pure Python wheel with no runtime dependencies. However, maintenance is dormant—last release was 2020-11-06 and last commit 2023-10-04, so security patches and compatibility updates are unlikely. License in practice: Apache-2.0 (permissive): you may use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and state material changes. Quickstart: pip install python3-dtls import ssl from socket import socket, AF_INET, SOCK_DGRAM from dtls import do_patch do_patch() sock = ssl.wrap_socket(socket(AF_INET, SOCK_DGRAM)) sock.connect(('example.com', 1234)) sock.send(b'message') Requires OpenSSL 1.1.1 or higher installed on the system; on Windows, source distributions include OpenSSL DLLs for 32-bit and 64-bit architectures. Verify before relying: - Whether the package works reliably with Python versions beyond 3.6 (classifier lists only 3.6, but requires_python is unspecified). - Current compatibility with modern OpenSSL versions and whether security patches from OpenSSL are automatically inherited. - Whether dormant maintenance affects real-world reliability for production UDP/DTLS workloads. ## Package facts - License: Apache-2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 213.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dtls udp encryption, datagram transport layer security python, secure udp sockets, dtls rfc 6347, ssl for udp, encrypted datagram communication, udp-security, dtls, cryptography [View on SkillFed](https://skillfed.io/packages/python3-dtls) · [View on PyPI](https://pypi.org/project/python3-dtls/)