Skip to main content

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

BSD-3-Clause

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

bec_lib-1.20.4.tar.gz (97.3 kB view details)

Uploaded Source

Built Distribution

bec_lib-1.20.4-py3-none-any.whl (112.1 kB view details)

Uploaded Python 3

File details

Details for the file bec_lib-1.20.4.tar.gz.

File metadata

  • Download URL: bec_lib-1.20.4.tar.gz
  • Upload date:
  • Size: 97.3 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.0.2 keyring/24.3.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for bec_lib-1.20.4.tar.gz
Algorithm Hash digest
SHA256 07bd66d6308a2d696b6486d4c80c3380f0d7f5b734139c0bf15a430b03387cdf
MD5 6876ce04477e0853a40cc4b1e5bc01b7
BLAKE2b-256 e0ec6bed3c886026a17bbfbea813b0d0007a11bc4d162ad9eb87b05b4fc0ffe6

See more details on using hashes here.

File details

Details for the file bec_lib-1.20.4-py3-none-any.whl.

File metadata

  • Download URL: bec_lib-1.20.4-py3-none-any.whl
  • Upload date:
  • Size: 112.1 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.0.2 keyring/24.3.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for bec_lib-1.20.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e345c3ac59eda1a925be2adf9fc07293884b86c9f3c33e41ed429aabe45f19
MD5 113cddf2ab1dd99688b703751fa3f5e1
BLAKE2b-256 b5bd086856ffa88b91979be8ef3180a87d06eb100183d3577fe9a6552b170364

See more details on using hashes here.

Supported by

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