Skip to main content

Python driver for MKS eBaratron capacitance manometers.

Project description

baratron

Python driver and command line tool for ToolWeb-enabled MKS eBaratron capacitance manometers.

Installation

pip install baratron

If you want to use the older python2/tornado implementation, use pip install baratron==0.1.2.

Usage

Command Line

To test your connection and stream real-time data, use the command-line interface. You can read the device with:

$ baratron 192.168.1.100
{
    "drift": 0.00164,
    "full-scale pressure": 1000.0,
    "led color": "green",
    "pressure": 3.78864,
    "pressure units": "torr",
    "run hours": 17517.763055555555,
    "system status": "e-Baratron Zeroing Recommended",
    "wait hours": 0.0
}

Python

This uses Python ≥3.5's async/await syntax to asynchronously communicate with the device. For example:

import asyncio
import baratron

async def get():
    async with baratron.CapacitanceManometer('the-baratron-ip-address') as sensor:
        print(await sensor.get())

asyncio.run(get())

Download files

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

Source Distribution

baratron-0.3.1.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

baratron-0.3.1-py2.py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 2 Python 3

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