Skip to main content

A package with an API for signal access and processing for the LHC Signal Monitoring project.

Project description

LHC Signal Monitoring API Package

This is a package with an API for signal access and processing for the LHC Signal Monitoring project.

The API documentation is available at

The API User Guide is available at


There are two ways of using the API in your code:

  1. Loading preinstalled packages from an EOS project folder (in SWAN environment)
  2. Manual installation (in any environment)

The first option guarantees the use of the most recent code version without manual installation. The second one is more time consuming, however, works in environments with no access to the EOS folder (e.g., Apache Airflow scheduler). In addition, the second method allows to install a selected version (pip install package_name=version).

Preinstalled Packages

To use the set of pre-installed packages please follow these three steps: 0. Contact the Signal Monitoring team ( in order to get read access to the EOS folder with pre-installed packages.

  1. (optional) Uninstall existing packages.
    Historically, the initial way of installing the packages was by manual installation discussed in Section Manual Installation. Thus, to avoid double reference to a package, please uninstall (with pip uninstall package_name) all packages needed for the API to work (tzlocal, tqdm, influxdb, plotly, lhcsmapi). This operation has to be done only once provided that the packages were installed (to check if a package was installed use pip list | grep package_name in SWAN Command Line Interface).
  2. While logging to SWAN service, please add the environment script as /eos/project/l/lhcsm/public/

Manual Installation

In order to use the API, it has to be installed with a python package installer as

pip install --user lhcsmapi

Check the latest version at

The API relies on several external python packages which have to be installed in a similar manner. The list of packages is stored in the <u>requirements.txt</u> file.

If you use SWAN, the service provides a set of pre-installed python packages through CVMFS. The LHC-SM notebooks require installation of several additional packages on top of CVMFS. In order to install a package, please open a SWAN Terminal by clicking [>_] icon in the top right corner.


Five additional python packages have to be installed:

  • tzlocal - for time zone convertion
  • tqdm - for progress bar to track queries
  • influxdb - for communication with an Influxdb
  • plotly - for interactive plotting of circuit schematics
  • lhcsmapi - for LHC-SM API In order to install a package please execute the following command
$ pip install --user package_name

The expected output, after installing all packages, is presented in five figures below.

  • SWAN Terminal output after successful installation of tzlocal package. SWAN pip install tzlocal

  • SWAN Terminal output after successful installation of tqdm package. SWAN pip install tqdm

  • SWAN Terminal output after successful installation of influxdb package. SWAN pip install influxdb

  • SWAN Terminal output after successful installation of plotly package. SWAN pip install plotly

  • SWAN Terminal output after successful installation of lhcsmapi package. SWAN pip install lhcsmapi

Updating lhcsmapi Package

Please note that the first four packages (tzlocal, tqdm, influxdb, plotly) have to be installed only once while the last one is still in the development phase and subject to frequent updates. Please send us an e-mail request ( if you want to subscribe for updates. In order to update the lhcsmapi package, please execute the following command.

$ pip install --user --upgrade lhcsmapi

Known Issues

At times, in order to update the lhcsmapi package one has to execute the command

pip install --user --upgrade lhcsmapi

twice while using the SWAN terminal (cf. an error message in the figure below).

In case this command returns an error, please try to execute it again. Should that operation also fail, please uninstall the package by executing

$ pip uninstall lhcsmapi

and performing a fresh installation the package

$ pip install --user lhcsmapi

Should you experience any further issues with installing a package, please contact SWAN support or use the preinstalled package with the environment script.

NXCALS Access with SWAN

The API allows to perform a query of signals from PM and NXCALS. The NXCALS database requires an assignment of dedicated access rights for a user. If you want to query NXCALS with the API, please follow a procedure below on how to request the NXCALS access.

  1. Go to for most updated procedure
  2. Send an e-mail to with the following pieces of information:
  • your NICE username
  • system: WinCCOA, CMW
  • NXCALS environment: PRO

Optionally one can mention that the NXCALS database will be accessed through SWAN. Once the access is granted, you can use NXCALS with SWAN.

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.

Files for lhcsmapi, version 1.5.13
Filename, size File type Python version Upload date Hashes
Filename, size lhcsmapi-1.5.13.tar.gz (792.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page