mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-12-18 20:21:21 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61b69d77cc | ||
|
|
8abe9357cf | ||
|
|
0dace2a9f0 | ||
|
|
9992ade0ed | ||
|
|
6c2cebada2 |
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "pydase"
|
name = "pydase"
|
||||||
version = "0.10.13"
|
version = "0.10.14"
|
||||||
description = "A flexible and robust Python library for creating, managing, and interacting with data services, with built-in support for web and RPC servers, and customizable features for diverse use cases."
|
description = "A flexible and robust Python library for creating, managing, and interacting with data services, with built-in support for web and RPC servers, and customizable features for diverse use cases."
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Mose Müller",email = "mosemueller@gmail.com"}
|
{name = "Mose Müller",email = "mosemueller@gmail.com"}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
from builtins import ModuleNotFoundError
|
||||||
from types import TracebackType
|
from types import TracebackType
|
||||||
from typing import TYPE_CHECKING, Any, TypedDict, cast
|
from typing import TYPE_CHECKING, Any, TypedDict, cast
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import aiohttp_socks.connector
|
|
||||||
import socketio # type: ignore
|
import socketio # type: ignore
|
||||||
|
|
||||||
from pydase.client.proxy_class import ProxyClass
|
from pydase.client.proxy_class import ProxyClass
|
||||||
@@ -150,6 +150,17 @@ class Client:
|
|||||||
|
|
||||||
def _initialize_socketio_client(self) -> None:
|
def _initialize_socketio_client(self) -> None:
|
||||||
if self._proxy_url is not None:
|
if self._proxy_url is not None:
|
||||||
|
try:
|
||||||
|
import aiohttp_socks.connector
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
raise ModuleNotFoundError(
|
||||||
|
"Missing dependency 'aiohttp_socks'. To use SOCKS5 proxy support, "
|
||||||
|
"install the optional 'socks' extra:\n\n"
|
||||||
|
' pip install "pydase[socks]"\n\n'
|
||||||
|
"This is required when specifying a `proxy_url` for "
|
||||||
|
"`pydase.Client`."
|
||||||
|
)
|
||||||
|
|
||||||
session = aiohttp.ClientSession(
|
session = aiohttp.ClientSession(
|
||||||
connector=aiohttp_socks.connector.ProxyConnector.from_url(
|
connector=aiohttp_socks.connector.ProxyConnector.from_url(
|
||||||
url=self._proxy_url, loop=self._loop
|
url=self._proxy_url, loop=self._loop
|
||||||
|
|||||||
Reference in New Issue
Block a user