From 348ff092aaaaf47645f0949fdcb830143904f729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Mon, 12 Aug 2024 13:25:11 +0200 Subject: [PATCH] updates Readme with client instructions --- README.md | 6 ++++-- docs/user-guide/interaction/Python Client.md | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a4ce2c4..7faaa9d 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,8 @@ import pydase # Replace the hostname and port with the IP address and the port of the machine where # the service is running, respectively -client_proxy = pydase.Client(hostname="", port=8001).proxy +client_proxy = pydase.Client(url="ws://:").proxy +# client_proxy = pydase.Client(url="wss://your-domain.ch").proxy # if your service uses ssl-encryption # After the connection, interact with the service attributes as if they were local client_proxy.voltage = 5.0 @@ -195,7 +196,8 @@ import pydase class MyService(pydase.DataService): # Initialize the client without blocking the constructor - proxy = pydase.Client(hostname="", port=8001, block_until_connected=False).proxy + proxy = pydase.Client(url="ws://:", block_until_connected=False).proxy + # proxy = pydase.Client(url="wss://your-domain.ch", block_until_connected=False).proxy # communicating with ssl-encrypted service if __name__ == "__main__": service = MyService() diff --git a/docs/user-guide/interaction/Python Client.md b/docs/user-guide/interaction/Python Client.md index ea844f2..e41c43c 100644 --- a/docs/user-guide/interaction/Python Client.md +++ b/docs/user-guide/interaction/Python Client.md @@ -5,9 +5,10 @@ You can connect to the service using the `pydase.Client`. Below is an example of ```python import pydase -# Replace the hostname and port with the IP address and the port of the machine -# where the service is running, respectively -client_proxy = pydase.Client(hostname="", port=8001).proxy +# Replace the hostname and port with the IP address and the port of the machine where +# the service is running, respectively +client_proxy = pydase.Client(url="ws://:").proxy +# client_proxy = pydase.Client(url="wss://your-domain.ch").proxy # if your service uses ssl-encryption # Interact with the service attributes as if they were local client_proxy.voltage = 5.0 @@ -32,7 +33,8 @@ import pydase class MyService(pydase.DataService): # Initialize the client without blocking the constructor - proxy = pydase.Client(hostname="", port=8001, block_until_connected=False).proxy + proxy = pydase.Client(url="ws://:", block_until_connected=False).proxy + # proxy = pydase.Client(url="wss://your-domain.ch", block_until_connected=False).proxy # communicating with ssl-encrypted service if __name__ == "__main__": service = MyService()