Abstraction layer for Python Qt networks.
Project description
QtPyNetwork is small abstraction layer for sending and receiving messages (JSON dicts) using TCP sockets. Messages can be encrypted with Fernet key.
There are two servers available - QBalancedServer and QThreadedServer. First one has constant amount of threads. When new client connects, server checks which worker has the least amount of active sockets and passes socket descriptor to this thread. QThreadedServer creates new thread for each connected device.
QThreadedClient is socket client, that keeps socket in separate thread.
Features: - Fernet encrypted communication - every message write and read call is executed inside thread - signals for each event - connected, disconnected, error, etc. - a different encryption key can be assigned for each client - methods for setting custom JSON encoder and decoder
Important: - messages must be dicts - encryption key must be Fernet key - to disable encryption, set b”” as key - servers can be subclassed, but handlers should not be
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for QtPyNetwork-0.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee5420c7856c53b3a9077a2925c474ef745d66b5cd2c29b88210e670baba6d5 |
|
MD5 | 3a6e0a984b9a344e968d8b5523cad3e3 |
|
BLAKE2b-256 | 0d75e2f1d960361ada12a75f9789c953bea45c9e8dae95ab547921efa130445a |