diff --git a/python_thingset/__init__.py b/python_thingset/__init__.py index e69de29..acd0b3c 100644 --- a/python_thingset/__init__.py +++ b/python_thingset/__init__.py @@ -0,0 +1,3 @@ +from .thingset import ThingSet + +__all__ = ["ThingSet"] diff --git a/python_thingset/backends/__init__.py b/python_thingset/backends/__init__.py new file mode 100644 index 0000000..e847f19 --- /dev/null +++ b/python_thingset/backends/__init__.py @@ -0,0 +1,6 @@ +from .backend import ThingSetBackend +from .can import ThingSetCAN +from .serial import ThingSetSerial +from .socket import ThingSetSock + +__all__ = ["ThingSetBackend", "ThingSetCAN", "ThingSetSerial", "ThingSetSock"] diff --git a/python_thingset/backends/can.py b/python_thingset/backends/can.py index af45b53..53f549e 100644 --- a/python_thingset/backends/can.py +++ b/python_thingset/backends/can.py @@ -12,7 +12,7 @@ from .backend import ThingSetBackend from ..client import ThingSetClient -from ..encoders.binary import ThingSetBinaryEncoder +from ..encoders import ThingSetBinaryEncoder from ..id import ThingSetID from ..log import get_logger diff --git a/python_thingset/backends/serial.py b/python_thingset/backends/serial.py index b71ae72..dddc6f9 100644 --- a/python_thingset/backends/serial.py +++ b/python_thingset/backends/serial.py @@ -10,7 +10,7 @@ from .backend import ThingSetBackend from ..client import ThingSetClient -from ..encoders.text import ThingSetTextEncoder +from ..encoders import ThingSetTextEncoder from ..log import get_logger diff --git a/python_thingset/backends/socket.py b/python_thingset/backends/socket.py index ed30b39..ccf101c 100644 --- a/python_thingset/backends/socket.py +++ b/python_thingset/backends/socket.py @@ -9,7 +9,7 @@ from .backend import ThingSetBackend from ..client import ThingSetClient -from ..encoders.binary import ThingSetBinaryEncoder +from ..encoders import ThingSetBinaryEncoder class Sock(ThingSetBackend): diff --git a/python_thingset/cli.py b/python_thingset/cli.py index af2abea..30e1185 100755 --- a/python_thingset/cli.py +++ b/python_thingset/cli.py @@ -10,7 +10,7 @@ from time import sleep from typing import Union -from .backends.backend import ThingSetBackend +from .backends import ThingSetBackend from .thingset import ThingSet diff --git a/python_thingset/client.py b/python_thingset/client.py index 553ad5a..3dfa2e1 100644 --- a/python_thingset/client.py +++ b/python_thingset/client.py @@ -6,7 +6,7 @@ from abc import ABC, abstractmethod from typing import Any, List, Union -from .backends.backend import ThingSetBackend +from .backends import ThingSetBackend from .response import ThingSetResponse, ThingSetStatus, ThingSetValue from .log import get_logger diff --git a/python_thingset/encoders/__init__.py b/python_thingset/encoders/__init__.py new file mode 100644 index 0000000..5ae1c2b --- /dev/null +++ b/python_thingset/encoders/__init__.py @@ -0,0 +1,4 @@ +from .binary import ThingSetBinaryEncoder +from .text import ThingSetTextEncoder + +__all__ = ["ThingSetBinaryEncoder", "ThingSetTextEncoder"] diff --git a/python_thingset/response.py b/python_thingset/response.py index 5b32b6b..128c2eb 100644 --- a/python_thingset/response.py +++ b/python_thingset/response.py @@ -9,7 +9,7 @@ import cbor2 -from .backends.backend import ThingSetBackend +from .backends import ThingSetBackend @dataclass diff --git a/python_thingset/thingset.py b/python_thingset/thingset.py index bde0cc8..50accc5 100755 --- a/python_thingset/thingset.py +++ b/python_thingset/thingset.py @@ -5,10 +5,7 @@ # from typing import Any, List, Union -from .backends.backend import ThingSetBackend -from .backends.can import ThingSetCAN -from .backends.serial import ThingSetSerial -from .backends.socket import ThingSetSock +from .backends import ThingSetBackend, ThingSetCAN, ThingSetSerial, ThingSetSock from .response import ThingSetResponse