Registry / devops / bec-lib

bec-lib

JSON →
library3.130.3pypypiunverified

BEC (Browser Embedded Control) library provides data models and client/server communication classes for scientific beamline experiments. Current version 3.130.3, released weekly.

pip install bec-lib
INSTALL
IMPORT
SIG · BEC-LIB
B
bec-lib
devopspythonv3.130.3
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.

BECMessage
from bec_lib.endpoints import BECMessage
from bec_lib import BECMessage

Connect to a BEC Redis server and check aliveness. Requires a running Redis instance.

import os from bec_lib.client import AlazarClient client = AlazarClient( redis_host=os.environ.get('REDIS_HOST', 'localhost'), redis_port=int(os.environ.get('REDIS_PORT', '6379')), ) print(client.is_alive())
Debug
Known issues
breakingv3.0 removed the old 'bec_lib.alazar' module; use 'bec_lib.client.AlazarClient'.
fix
Replace 'from bec_lib.alazar import AlazarClient' with 'from bec_lib.client import AlazarClient'.
affects: >=3.0.0
deprecatedRedisConnector is deprecated in favor of direct client usage (AlazarClient).
fix
Use AlazarClient which internally manages the connector.
affects: <=3.130.3
gotchaThe package is installed as 'bec-lib' with a hyphen, but Python imports use 'bec_lib' with an underscore.
fix
Always use 'import bec_lib' in code, not 'bec-lib'.
affects: all
gotchaBy default, the client expects a Redis server on localhost:6379. If not running, connection will hang.
fix
Ensure Redis is running or provide different host/port via environment variables.
affects: all
Upgrade
Version history
3.130.3latest on PyPI · released Jun 5, 2026
Audit
Dependencies
redisrequiredRequired for Redis backend communication (AlazarClient uses redis).
blueskyoptionalUsed for event model compatibility if using bluesky integration.
Agent activity
5 hits · last 30 days
node
4
Resources
bec-lib — pip install bec-lib · libregistry