Using Capabilities
Learn about Tooz capabilities in Python.
We'll cover the following
Tooz provides a capability mechanism on top of the group feature. When joining a group, a member can specify what its capabilities are. It can also update them later as needed.
Capabilities are any simple data structure that your program needs to share. It can be as simple as a string and as complicated as a nested dictionary. The typical usage of this data structure is to pass information about the member, such as its processing power or its feature set. It allows filtering members based on their functionality or weighing them differently based on their computing power.
Joining a group with a capability set
The example below shows a complete example of joining a group with a capability set. In this example, each client can provide a mood when joining a group. All members can then get member capabilities and retrieve their moods.
Get hands-on with 1400+ tech skills courses.