Skip to main content

Handyscope provides a Python interface to the mobile USB-oscilloscopes made by TiePie.

This package is inspired by python-libtiepie and acts as an alternative. The main differences are the following:

  1. python-libtiepie has some constants defined, which can be used to set properties like signal type. However, the user needs to know the names of these constants and they cannot be printed due to actually being numerical (binary) values. In handyscope, the values are given as strings and an overview of the available strings is provided in an additional property.

  2. The error check is performed automatically after every method call.

  3. More easier way of opening of devices.

Example of setting and getting the signal type in python-libtiepie:

# Set the signal type to triangle
gen.signal_type = libtiepie.ST_TRIANGLE
# Prints 0x00000010
print(gen.signal_type)

Example of setting and getting the signal type in handyscope:

# Prints the tuple ('sine', 'triangle', 'square', 'DC', 'noise', 'arbitrary', 'pulse')
print(gen.signal_types_available)
# Set the signal type to triangle
gen.signal_type = "triangle"
# Prints "triangle"
print(gen.signal_type)

Example of opening a generator device from python-libtiepie:

import libtiepie

# Search for devices:
libtiepie.device_list.update()

# Try to open a generator:
gen = None
for item in libtiepie.device_list:
    if item.can_open(libtiepie.DEVICETYPE_GENERATOR):
        gen = item.open_generator()
        if gen:
            break

Example of opening a generator device using handyscope:

from handyscope import Generator

gen = Generator("HS5")

Features

  • Uses libtiepie

  • Provides access to oscilloscope, signal generator and I2C interface features

  • Works with Windows and Linux

SDK version

This package uses LibTiePie SDK 0.9.16 and does not support the newer libtiepie-hw. In libtiepie-hw, support for I2C was removed (see migration guide), which is why handyscope won’t be migrated for now.

Installation

To install the Handyscope Interface, run this command in your terminal:

$ pip install handyscope

Note that usage in Windows will require the TiePie USB driver version 8.1.9. If you are also using TiePie’s MultiChannelSoftware, please install version 1.44.1 from their download archive, as this is the latest version working with driver 8.1.9. The library files for Windows (32 & 64-bit) and Linux (x86-64/amd64) are included in handyscope, there’s no need for additional installations. For other Linux architectures, please follow TiePie’s library installation instructions.

Usage

Example for using an oscilloscope device:

from handyscope import Oscilloscope
# To initialize as HS3 oscilloscope device
osc = Oscilloscope("HS3")
# Set the range of the channels to 4 Volts
osc.channels[0].range = 4
osc.channels[1].range = 4
# Set the trigger kind to rising edge
osc.channels[0].trig_kind = "rising"
# Enable the trigger
osc.channels[0].trig_enabled= True
# Disable the trigger timeout
osc.trig_timeout = -1
# Set record length and sampling frequency
osc.record_length = 62500
osc.sample_freq = 100000
# Start measuring and get the data
data = osc.measure()

Example for using a generator device:

from handyscope import Generator
# To initialize as HS3 generator device
gen = Generator("HS3")
# Set the signal type to a sinus wave
gen.signal_type = "sine"
# Set the amplitude to 2 Volts
gen.amplitude = 2
# Set the frequency to 100 Hz
gen.freq = 100
# Enable the output
gen.is_out_on = True
# Start the generator
gen.start()

Documentation

The documentation for handyscope can be built with:

$ sphinx-build -M html docs build

Open build/html/index.html with your preferred browser to read the generated documentation.

Metadata

Release files for handyscope 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for handyscope 1.3.0
File Size Uploaded Provenance Actions
handyscope-1.3.0.tar.gz 4.3 MB Without provenance Details for handyscope-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for handyscope 1.3.0
File Interpreter ABI Platform Actions
handyscope-1.3.0-py3-none-any.whl Python 3 none any Details for handyscope-1.3.0-py3-none-any.whl

Total release size: 8.6 MB

Release files / handyscope-1.3.0.tar.gz

Download URL handyscope-1.3.0.tar.gz
Size 4.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4c323c56cf1cbf2b4a4afa420afd58892b71d0a24c7e7008d55ef01637663d71
BLAKE2b-256 checksum
How to use checksums
e6c94d1116ebfe40a075f34f11e348312ea27b41c0b0d2409c784d6b26eb1a48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / handyscope-1.3.0-py3-none-any.whl

Download URL handyscope-1.3.0-py3-none-any.whl
Size 4.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a69192a8b372364603d14afcb724318b2c650cf88a4d0b166811865d2aa66ada
BLAKE2b-256 checksum
How to use checksums
fb9afeed9beca87d50b7332b09d0f36ca017c19142a18a249de89511fc2e3e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for handyscope 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page