Skip to main content

High level Python bindings for the libarc2 library

Reason this release was yanked:

Incorrect python dependency

Project description

Python bindings for libarc2

Introduction

This library presents a python interface to the low-level libarc2 library used to interface with ArC TWO™. Most of the user-facing facilities of libarc2 are present in this library. That being said, pyarc2 itself is still relatively low-level and a general understanding of the internals of ArC TWO is required.

Use

pyarc2 maps most of the functionality of libarc2 so the API translates fairly transparent. Most of the interaction with ArC TWO will be through the Instrument class that encapsulates the implemented functionality of libarc2. The library will keep being updated as new functionality is added. For instance to read the current between two channels you can write

from pyarc2 import Instrument, find_ids

# low voltage channel (typically grounded)
LOWV = 7
# high voltage channel
HIGHV = 33
# read-out voltage
VREAD = 0.2

# Get the ID of the first available ArC TWO
arc2id = find_ids()[0]

# firmware; shipped with your board
fw = 'arc2fw.bin'

# connect to the board
arc = Instrument(arc2id, fw)

current = arc.read_one(LOWV, HIGHV, VREAD)
print('I = %g A' % current)

Additional functionality

pyarc2 can also be used to implement new plugins based on libarc2. Access to the lower level object is done via Instrument::inner() and Instrument::inner_mut(). These plugins can fully leverage libarc2 functionality but require some familiarity with Rust and the libarc2 API.

Project details


Download files

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

Source Distribution

pyarc2-0.2.0.tar.gz (50.2 kB view hashes)

Uploaded Source

Built Distributions

pyarc2-0.2.0-cp311-none-win_amd64.whl (600.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyarc2-0.2.0-cp311-cp311-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.24+ x86-64

pyarc2-0.2.0-cp310-none-win_amd64.whl (600.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyarc2-0.2.0-cp310-cp310-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

pyarc2-0.2.0-cp39-none-win_amd64.whl (596.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyarc2-0.2.0-cp39-cp39-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

pyarc2-0.2.0-cp38-none-win_amd64.whl (595.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyarc2-0.2.0-cp38-cp38-manylinux_2_24_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

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