Async/await wrapper for PyEpics
Project description
pyepics-asyncio
Simple async
/await
wrapper for PyEpics.
Overview
There are two main types:
PvMonitor
- subscribed to PV updates,get
returns last received value.Pv
- connected but not subscribed, eachget
requests PV value over network.
Usage
Read PV value
from pyepics_asyncio import Pv
pv = await Pv.connect("pvname")
print(await pv.get())
Monitor PV
from pyepics_asyncio import PvMonitor
pv = await PvMonitor.connect("pvname")
async for value in pv:
print(value)
Write value to PV
await pv.put(3.1415)
Testing
To run tests you need to have dummy IOC running (located in ioc
dir):
- Set appropriate
EPICS_BASE
path inconfigure/RELEASE
. - Build with
make
. - Go to
iocBoot/iocTest/
and run scriptst.cmd
and don't stop it.
In separate shell run poetry run pytest --verbose
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyepics_asyncio-0.2.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for pyepics_asyncio-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b54c8036ef6f5fcd2ed39d58a89a9d927ebc37e51d30aa73b1c537ecddec633 |
|
MD5 | ae308040fcdc7f9ad29d478469a3f1d8 |
|
BLAKE2b-256 | 75104272e5815aab816e2793eaaf8e05c3f5a0f283769c1dcb245b9572fb7797 |