Swimos

Latest version: v1.6.0a0

Safety actively analyzes 685507 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.6.0alpha

* Added support for authentication.
* Extended the retry system to include re-auth.

1.5.0alpha

**Changelog**:

1) Downlinks will now reconnect by default when there is a connection failure.
2) Added `keep_linked` and `keep_synced`

python
...

value_downlink = swim_client.downlink_value()
value_downlink.set_host_uri('ws://localhost:9001/')
value_downlink.set_node_uri('/unit/foo')
value_downlink.set_lane_uri('info')

value_downlink.keep_synced(True)
value_downlink.keep_linked(False)

...



3) Added method for waiting until all client tasks are completed. The behaviour is modeled after the `[Thread.join` interface](https://docs.python.org/3/library/threading.html#threading.Thread.join).
Fred, This should address the problem that you had.

python
if __name__ == '__main__':
swim_client = SwimClient()
swim_client.start()

event_downlink = swim_client.downlink_event()
event_downlink.set_host_uri('ws://localhost:9001/')
event_downlink.set_node_uri('/unit/foo')
event_downlink.set_lane_uri("publishValue")
event_downlink.on_event(custom_on_event)
event_downlink.open()

This is used to block the thread until all client tasks have completed
swim_client.join()

Alternatively, a maximum timeout may be provided which will unblock the thread after it has elapsed
swim_client.join(timeout=300)



4) Added custom errors for trying to open a downlink before first setting the host, node or lane.

1.4.0alpha

Added additional callbacks.

1.3.0alpha

1.2.0alpha

<b>Changelog:</b>
* Added support for WSS.

1.1.0alpha

<b>Changelog:</b>
* Map downlinks now handle updates before sync properly.
* Removed unnecessary async annotations.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.