Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

QtPyNetwork-0.4.3.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

QtPyNetwork-0.4.3-py3-none-any.whl (18.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page