diff --git a/CHANGELOG.md b/CHANGELOG.md index 58d8e45..8dbbdcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Security -- cookie auth & its specification in TD +✓ means ready to try + +- cookie auth & its specification in TD (cookie auth branch) +- image event handlers (develop branch) for streaming live video as JPEG and PNG ✓ +- pydantic support for property models (develop branch) ✓ + +## [v0.2.3] - 2024-08-11 + +- HTTP SSE minor bug-fix/optimization - no difference to the user ## [v0.2.2] - 2024-08-09 - thing control panel works better with the server side and support observable properties -- `ObjectProxy` client API has been improved to resemble WoT operations better, for examplem `get_property` is now +- `ObjectProxy` client API has been improved to resemble WoT operations better, for example `get_property` is now called `read_property`, `set_properties` is now called `write_multiple_properties`. - `ObjectProxy` client reliability for poorly written server side actions improved diff --git a/README.md b/README.md index 1c13871..bab7e68 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### Description -`hololinked` is a server side pythonic tool suited for instrumentation control and data acquisition over network, especially with HTTP. If you have a requirement to control and capture data from your hardware/instrumentation, show the data in a browser/dashboard, provide a GUI or run automated scripts, `hololinked` can help. Even for isolated applications or a small lab setup without networking concepts, one can still separate the concerns of the tools that interact with the hardware & the hardware itself. +`hololinked` is a beginner-friendly server side pythonic tool suited for instrumentation control and data acquisition over network, especially with HTTP. If you have a requirement to control and capture data from your hardware/instrumentation, show the data in a browser/dashboard, provide a GUI or run automated scripts, `hololinked` can help. Even for isolated applications or a small lab setup without networking concepts, one can still separate the concerns of the tools that interact with the hardware & the hardware itself. [![Documentation Status](https://readthedocs.org/projects/hololinked/badge/?version=latest)](https://hololinked.readthedocs.io/en/latest/?badge=latest) [![PyPI](https://img.shields.io/pypi/v/hololinked?label=pypi%20package)](https://pypi.org/project/hololinked/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/hololinked)](https://pypistats.org/packages/hololinked) [![codecov](https://codecov.io/gh/VigneshVSV/hololinked/graph/badge.svg?token=JF1928KTFE)](https://codecov.io/gh/VigneshVSV/hololinked)
diff --git a/doc b/doc index a064864..84450d0 160000 --- a/doc +++ b/doc @@ -1 +1 @@ -Subproject commit a064864119dd4270a69b38621d79678a9f1b8069 +Subproject commit 84450d06c1f09e74df08afafa9f5e6571569d32c diff --git a/examples b/examples index 8a70beb..846e00d 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 8a70bebddd4da7d66674ec3e3da469db120dab70 +Subproject commit 846e00dca80c0fd2930eebf4b247662915229d49 diff --git a/hololinked/__init__.py b/hololinked/__init__.py index b5fdc75..d31c31e 100644 --- a/hololinked/__init__.py +++ b/hololinked/__init__.py @@ -1 +1 @@ -__version__ = "0.2.2" +__version__ = "0.2.3" diff --git a/hololinked/server/HTTPServer.py b/hololinked/server/HTTPServer.py index 6c1f5c7..5fd4b3f 100644 --- a/hololinked/server/HTTPServer.py +++ b/hololinked/server/HTTPServer.py @@ -136,8 +136,8 @@ def __init__(self, things : typing.List[str], *, port : int = 8080, address : st self._type = HTTPServerTypes.THING_SERVER self._lost_things = dict() # see update_router_with_thing self._zmq_protocol = ZMQ_PROTOCOLS.IPC - self._zmq_socket_context = None - self._zmq_event_context = None + self._zmq_inproc_socket_context = None + self._zmq_inproc_event_context = None @property def all_ok(self) -> bool: @@ -156,7 +156,7 @@ def all_ok(self) -> bool: self.zmq_client_pool = MessageMappedZMQClientPool(self.things, identity=self._IP, deserialize_server_messages=False, handshake=False, http_serializer=self.serializer, - context=self._zmq_socket_context, + context=self._zmq_inproc_socket_context, protocol=self._zmq_protocol, logger=self.logger ) diff --git a/hololinked/server/handlers.py b/hololinked/server/handlers.py index b333524..8aad290 100644 --- a/hololinked/server/handlers.py +++ b/hololinked/server/handlers.py @@ -265,7 +265,7 @@ async def handle_datastream(self) -> None: called by GET method and handles the event. """ try: - event_consumer_cls = EventConsumer if hasattr(self.owner, '_zmq_event_context') else AsyncEventConsumer + event_consumer_cls = EventConsumer if self.owner._zmq_inproc_event_context else AsyncEventConsumer # synchronous context with INPROC pub or asynchronous context with IPC or TCP pub, we handle both in async # fashion as HTTP server should be running purely sync(or normal) python method. event_consumer = event_consumer_cls(self.resource.unique_identifier, self.resource.socket_address, @@ -301,7 +301,7 @@ async def handle_datastream(self) -> None: self.write(data_header % self.serializer.dumps( {"exception" : format_exception_as_json(ex)})) try: - if isinstance(self.owner._zmq_event_context, zmq.asyncio.Context): + if isinstance(self.owner._zmq_inproc_event_context, zmq.asyncio.Context): event_consumer.exit() except Exception as ex: self.logger.error(f"error while closing event consumer - {str(ex)}" ) diff --git a/setup.py b/setup.py index e4083a5..198b9e1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name="hololinked", - version="0.2.2", + version="0.2.3", author="Vigneh Vaidyanathan", author_email="vignesh.vaidyanathan@hololinked.dev", description="A ZMQ-based Object Oriented RPC tool-kit with HTTP support for instrument control/data acquisition or controlling generic python objects.",