Readme Files

Readme files are included in this page, for convenience and cross-referencing.

eshet.py

A python and asyncio client for ESHET, compatible with eshetsrv.

Have a look at the examples to see how it works.

install

It’s a standard python package, so install it into a virtualenv with pip install .

The only quirk is that the eshet.yarp module requires use of my fork of yarp. This is specified in the package, but might need special attention if you already have some other version installed. This really needs renaming.

develop

pip install -e .[test,dev]

format:

black eshet examples

lint:

flake8 eshet examples

test:

pytest

For some tests (marked needs_server), a running ESHET server is required.

license

Copyright 2023 Thomas Nixon

This program is free software: you can redistribute it and/or modify it under
the terms of version 3 of the GNU General Public License as published by the
Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

See LICENSE.

examples

Examples in this directory should have argument parsers which describe how they are used – run them with --help.

eshet.py uses the same ESHET_SERVER environment variable as eshetcpp to find the server by default. You may need to set it to run the examples.

bind_state.py

Make a state which reflects the value of another, and propagates sets, implemented with the normal API.

For example, running these commands:

python examples/bind_state.py /a /b
eshet publish /a
eshet observe /a

values typed into publish will appear from observe

bind_state_yarp.py

The same (or very nearly) as bind_state.py, but implemented using the yarp wrappers.

event_to_state_timer.py

Something like a typical PIR light controller. Listens to an event, and publishes a state which is true if any events were emitted recently.

For example, run these commands:

python examples/event_to_state_timer.py /event /state
eshet observe /state

Then run this to see the output of observe change from false to true:

eshet emit /event null