1{ lib
2, aiohttp
3, bidict
4, buildPythonPackage
5, fetchFromGitHub
6, mock
7, msgpack
8, pytestCheckHook
9, python-engineio
10, pythonOlder
11, requests
12, websocket-client
13}:
14
15buildPythonPackage rec {
16 pname = "python-socketio";
17 version = "5.9.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchFromGitHub {
23 owner = "miguelgrinberg";
24 repo = "python-socketio";
25 rev = "v${version}";
26 hash = "sha256-1lyTZwkRpGRbeBqt6Thv5o+bUzkD1sC3T9T1GbWMEkI=";
27 };
28
29 propagatedBuildInputs = [
30 bidict
31 python-engineio
32 ];
33
34 passthru.optional-dependencies = {
35 client = [
36 requests
37 websocket-client
38 ];
39 asyncio_client = [
40 aiohttp
41 ];
42 };
43
44 nativeCheckInputs = [
45 mock
46 msgpack
47 pytestCheckHook
48 ];
49
50 pythonImportsCheck = [
51 "socketio"
52 ];
53
54 meta = with lib; {
55 description = "Python Socket.IO server and client";
56 longDescription = ''
57 Socket.IO is a lightweight transport protocol that enables real-time
58 bidirectional event-based communication between clients and a server.
59 '';
60 homepage = "https://github.com/miguelgrinberg/python-socketio/";
61 changelog = "https://github.com/miguelgrinberg/python-socketio/blob/v${version}/CHANGES.md";
62 license = with licenses; [ mit ];
63 maintainers = with maintainers; [ mic92 ];
64 };
65}