Skip to main content

No project description provided

Project description


gitea: none include_toc: true

LabFlask

This Flask based web server connects to your (HP) lab equipment via linux-gpib, allowing you to remote control it from any modern web browser.

This is a very first version just to get things moving, and it's highly limited.

  • To the HP 3478A
  • with an harcoded adress
  • using the --no-websockets option
  • and not stable

Compatibility & OS Support

This software was developed and tested exclusively under Linux.

To access instruments connected to a GPIB card the latest Linux GPIB Package 4.3.7 is needed.

Installation

For the latest version please download the source code or clone the repository. Generate the distribution archives using build. These archives (.whl,.tar.gz or .zip) can be installed by pip.

cd LabFlask                                                                # Where the 'pyproject.toml' is located.
python3.12 -m build                                                        # Generate the distribution archives.
sudo pip install --force-reinstall dist/labflask-0.0.1-py3-none-any.whl    # Install the package.
sudo pip uninstall labflask                                                # Remove the package.

Or install the published package from PyPI.

sudo pip install -i https://pypi.org/simple/ labflask

[!NOTE] A global installation is recommended since this application will likely be deployed as a systemd service.

Setup

[!CAUTION] Unrestricted Application Access: This Flask application is currently running with NO data validation or entry restrictions. All payloads are forwarded unchecked as commands over GPIB.

  1. DO NOT expose this server to the public internet under any circumstances.
  2. Ensure the host is strictly bound to localhost (e.g., host='127.0.0.1').
  3. Restrict network access via firewalls if local network sharing is required.

Exposing this application publicly will vulnerable your lab equipment to attacks.

This application requires external dependencies and files beyond standard Python packages. The LabFlask-setup script will guide you through most of this configuration process.

sudo /usr/local/bin/LabFlask-setup

Command reference

usage: LabFlasked [-h] [-c CONFIG] [-H HOST] [-p PORT] [-w | --websockets | --no-websockets] [-D] [-v]

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path to config file (default: ['~/.config/LabFlask/settings.ini', '/etc/LabFlask/settings.ini'])
  -H HOST, --host HOST  network interfaces the server is listen too (default: 127.0.0.1)
  -p PORT, --port PORT  port the server is listen too (default: 5002)
  -w, --websockets, --no-websockets
                        force use of websockets instead of polling (default: False)
  -D, --debug           set debug mode for Socket.IO (default: False)
  -v, --verbose         set verbose mode (default: 0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labflask-0.0.1-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file labflask-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: labflask-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for labflask-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4cca9370a13df669af8ccd7c186dd3c0a576fc471a6b1c8572940f9a5e61565
MD5 f4f1d157a1ad65c7931937b03833a22b
BLAKE2b-256 84c793e70ab1d4fea9a756bbda25c83b77cc85ae32f686e6c1f2fda86d10df3c

See more details on using hashes here.

Supported by

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