BEC library
Project description
BEC Lib
bec-lib is a Python library communicating with the Beamline and Experiment Control (BEC) server. It is primarily used to build new BEC clients such as graphical user interfaces (GUIs) or command line interfaces (CLIs).
Installation
Use the package manager pip to install bec-lib.
pip install bec-lib
Documentation
The documentation is part of the BEC documentation and can be found here.
Usage
from bec_lib import BECClient
# Create a new BECClient instance and start it
bec = BECClient()
bec.start()
# Convenient access to scans and devices
scans = bec.scans
dev = bec.device_manager.devices
# define a dummy callback function
def dummy_callback(data, metadata):
print(data, metadata)
# add the callback and subscribe to the scan segments
bec.callbacks.register(event_type="scan_segment", callback=dummy_callback, sync=False)
Contributing
Merge requests are very welcome! For major changes, please open an issue first to discuss what you would like to change. All commits should use the Angular commit scheme:
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
│ devtools
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
The <type>
and <summary>
fields are mandatory, the (<scope>)
field is optional.
Type
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
Please make sure to update tests as necessary.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bec_lib-1.22.1.tar.gz
.
File metadata
- Download URL: bec_lib-1.22.1.tar.gz
- Upload date:
- Size: 100.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.1.0 keyring/25.1.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dbf0a50764cb785cf363be715c00759064ad0b1b80616b4cd5eb31f4d8884c6 |
|
MD5 | 4a1466235e7680d1b91edcd202b8863c |
|
BLAKE2b-256 | a445dc28efd48fe165d3283e28f26d2992882e92892e89f97704839aaf99da5a |
File details
Details for the file bec_lib-1.22.1-py3-none-any.whl
.
File metadata
- Download URL: bec_lib-1.22.1-py3-none-any.whl
- Upload date:
- Size: 115.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.1.0 keyring/25.1.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bd41ae74820c5eb65494fbeb844d5d5556cc1b1e70cf8f5c1cf5ed78b4a2874 |
|
MD5 | 030035c0d68697da3d14721b03688a1c |
|
BLAKE2b-256 | 10750872217f095bed1e4def5e5f108ad3fbf5ef6f1f37d2dacfe596c64ff137 |