mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 16:50:02 +02:00
adds Client to default exports of pydase
This commit is contained in:
parent
60a7dda60a
commit
c0b25c0581
@ -1,3 +1,4 @@
|
||||
from pydase.client.client import Client
|
||||
from pydase.data_service import DataService
|
||||
from pydase.server import Server
|
||||
from pydase.utils.logging import setup_logging
|
||||
@ -7,4 +8,5 @@ setup_logging()
|
||||
__all__ = [
|
||||
"DataService",
|
||||
"Server",
|
||||
"Client",
|
||||
]
|
||||
|
@ -0,0 +1,3 @@
|
||||
from pydase.client.client import Client
|
||||
|
||||
__all__ = ["Client"]
|
@ -5,7 +5,7 @@ from typing import Any, TypedDict, cast
|
||||
|
||||
import socketio # type: ignore
|
||||
|
||||
import pydase
|
||||
import pydase.data_service
|
||||
from pydase.client.proxy_class_factory import ProxyClassFactory, ProxyConnection
|
||||
from pydase.utils.helpers import is_property_attribute
|
||||
from pydase.utils.serialization.deserializer import loads
|
||||
@ -24,7 +24,7 @@ class NotifyDict(TypedDict):
|
||||
data: NotifyDataDict
|
||||
|
||||
|
||||
class Client(pydase.DataService):
|
||||
class Client(pydase.data_service.DataService):
|
||||
def __init__(self, hostname: str, port: int):
|
||||
super().__init__()
|
||||
self._hostname = hostname
|
||||
@ -93,7 +93,6 @@ class Client(pydase.DataService):
|
||||
and not is_property_attribute(self, changed_attribute)
|
||||
and all(part[0] != "_" for part in changed_attribute.split("."))
|
||||
):
|
||||
logger.debug(f"{changed_attribute}: {value}")
|
||||
|
||||
async def update_value() -> None:
|
||||
await self._sio.call(
|
||||
|
@ -6,8 +6,8 @@ from typing import Any, cast
|
||||
|
||||
import socketio # type: ignore
|
||||
|
||||
import pydase
|
||||
import pydase.components
|
||||
import pydase.data_service
|
||||
import pydase.observer_pattern.observer
|
||||
from pydase.utils.helpers import is_property_attribute
|
||||
from pydase.utils.serialization.deserializer import Deserializer, loads
|
||||
@ -36,7 +36,7 @@ class ProxyClassMixin:
|
||||
super().__setattr__(key, value)
|
||||
|
||||
|
||||
class ProxyBaseClass(pydase.DataService, ProxyClassMixin):
|
||||
class ProxyBaseClass(pydase.data_service.DataService, ProxyClassMixin):
|
||||
pass
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ class ProxyClassFactory:
|
||||
|
||||
def _deserialize_component_type(
|
||||
self, serialized_object: SerializedObject, base_class: type
|
||||
) -> pydase.DataService:
|
||||
) -> pydase.data_service.DataService:
|
||||
def add_prefix_to_last_path_element(s: str, prefix: str) -> str:
|
||||
parts = s.split(".")
|
||||
parts[-1] = f"{prefix}_{parts[-1]}"
|
||||
|
@ -1,9 +1,9 @@
|
||||
import asyncio
|
||||
|
||||
import pydase
|
||||
import pydase.data_service
|
||||
|
||||
|
||||
class DeviceConnection(pydase.DataService):
|
||||
class DeviceConnection(pydase.data_service.DataService):
|
||||
"""
|
||||
Base class for device connection management within the pydase framework.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user