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()