Skip to main content

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, each get requests PV value over network.

Usage

Connect to PV

from pyepics_asyncio import Pv

pv = await Pv.connect("pvname")

Write value to PV

await pv.put(3.1415)

Read value from PV

print(await pv.get())

Monitor PV value updates

with pv.monitor() as mon:
    async for value in mon:
        print(value)

Testing

To run tests you need to have dummy IOC running (located in ioc dir):

  • Set appropriate EPICS_BASE path in configure/RELEASE.
  • Build with make.
  • Go to iocBoot/iocTest/ and run script st.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.3.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyepics_asyncio-0.3.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pyepics_asyncio-0.3.0.tar.gz.

File metadata

  • Download URL: pyepics_asyncio-0.3.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-10-amd64

File hashes

Hashes for pyepics_asyncio-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a011c8165522e7187df7843012b6ac44757674fdd45779092734bc9ae9801a57
MD5 7667f66a8fd9b4b2933a88a76fa28cc7
BLAKE2b-256 fd43a8bd052e38bd0b3644b80c75c5a9aa7f1380a0ed2cfe9a7f89798f7bcfb9

See more details on using hashes here.

File details

Details for the file pyepics_asyncio-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyepics_asyncio-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-10-amd64

File hashes

Hashes for pyepics_asyncio-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7532635e7739189ecc485526b7be58457cda6d93ede3dde429da4f1da3a4bee7
MD5 434fe9e29bfdb9f372d48ee5062217b6
BLAKE2b-256 b367857fb226f833d8828ad575d6216f2922f10c6fa4f46ae97de6592c9e283f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page