Registry / auth-security / python3-dtls

python3-dtls

JSON →
library1.3.0pypypiunverified

Implementation of Datagram Transport Layer Security (DTLS) for Python. Provides DTLS client and server support over UDP. Current version 1.3.0 has no declared Python version requirement. Release cadence is low, typically one release every few years.

pip install python3-dtls
INSTALL
IMPORT
SIG · PYTHON3-DTLS
P
python3-dtls
auth-securitypythonv1.3.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DTLSClientSocket
import dtls
from dtls import DTLSClientSocket

Simple DTLS client and server example using DTLSClientSocket and DTLSServerSocket.

import os from dtls import DTLSClientSocket, DTLSServerSocket # Client example client_socket = DTLSClientSocket() client_socket.connect(('localhost', 4433)) client_socket.send(b'Hello over DTLS') data = client_socket.recv(1024) print(data) client_socket.close() # Server example server_socket = DTLSServerSocket() server_socket.bind(('', 4433)) client, addr = server_socket.accept() data = client.recv(1024) print('Received:', data) client.send(b'Hello from server') client.close()
Debug
Known issues
gotchaThe library does not automatically handle DTLS retransmission timers. You must implement application-level timeouts or use threading to avoid blocking on recv() indefinitely if packets are lost.
fix
Wrap socket operations with timeout or use select module.
affects: <=1.3.0
deprecatedVersion 1.3.0 lacks support for DTLS 1.2; only DTLS 1.0 is supported. Upcoming versions may drop DTLS 1.0 completely.
fix
Be prepared to migrate to a library supporting DTLS 1.2 or later (e.g., pyOpenSSL with DTLS).
affects: <=1.3.0
gotchaThe library depends on pycrypto and pyopenssl. On some platforms, pycrypto may require a C compiler or additional system libraries (e.g., libffi-dev, libssl-dev).
fix
Install system dependencies: on Ubuntu/Debian run 'sudo apt-get install build-essential libssl-dev libffi-dev' before pip install.
affects: <=1.3.0
breakingIn version 1.3.0, the DTLSClientSocket and DTLSServerSocket classes were renamed from older names. Code using old class names will break.
fix
Use DTLSClientSocket and DTLSServerSocket instead of any previous names.
affects: 1.3.0
Upgrade
Version history
1.3.0latest on PyPI · released Nov 6, 2020
Audit
Dependencies
pycryptorequiredUsed for cryptographic operations
pyopensslrequiredUsed for TLS/DTLS handshake and encryption
Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
python3-dtls — pip install python3-dtls · libregistry