Registry / data / p4p
library4.2.2pypypi✓ verified 79d ago

Python interface to PVAccess (PV Access) protocol client for EPICS. Current version 4.2.2, supports Python >=2.7. Maintained by EPICS community, follow EPICS release cadence.

pip install p4p
INSTALL
IMPORT
SIG · P4P
P
p4p
datapythonv4.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Type
from p4p import Type
from p4p.client import pva
Value
from p4p import Value
set_debug
from p4p import set_debug

Create a PVA client context, fetch a value or monitor a PV.

import os from p4p.client.pva import Context with Context('pva') as ctx: value = ctx.get(os.environ.get('PV_NAME', 'blah:example')) print(value) # Alternatively, using channel for monitoring: with Context('pva') as ctx: ch = ctx.monitor(os.environ.get('PV_NAME', 'blah:example')) for update in ch: print(update) break # just one sample
Debug
Known issues
breakingp4p 4.0 removed support for Python 2.7. Users on older systems must pin to p4p<4.0.
fix
Use Python 3.6+ or pin to p4p==3.x.
affects: >=4.0.0
breakingContext usage changed: old import path `from p4p import Context` no longer works; use `from p4p.client import Context`.
fix
Update imports to `from p4p.client import Context`.
affects: >=4.0.0
deprecatedThe `rpc` module (p4p.client.rpc) is deprecated in favor of new `p4p.client.pva` for all operations. Expect removal in a future major release.
fix
Migrate from `from p4p.client import rpc` to `from p4p.client.pva import Context`.
affects: >=4.1.0
gotchaMany examples use `Context('pva', ...)` but the provider string is environment-specific. Default provider 'pva' works for most sites, but if server uses 'ca' or custom, must specify correctly.
fix
Check site's PV Access provider setting (e.g., EPICS_PVA_PROVIDER). Use `Context('pva')` for native PVA, or `Context('ca')` for Channel Access relay.
affects: all
gotchaMonitoring channels using `ctx.monitor()` returns an iterator that blocks indefinitely. For GUI or non-blocking applications, use `ch = ctx.monitor(...); ch.start()` with callbacks (see docs for `start` method).
fix
Use callback-based monitoring: `ch = ctx.monitor(...); ch.start(lambda x: print(x))`
affects: all
Upgrade
Version history
4.2.2latest on PyPI · released Jan 8, 2026
Audit
Dependencies
numpyrequiredRequired for numeric channel data handling.
psutiloptionalUsed for process monitoring and resource management.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources