Skip to main content

Python-API for libsigrok

Project description

python-sigrok

Python-API for libsigrok

Installation

pip install sigrok

Requirements

Ubuntu

apt install libsigrok4 libsigrok-dev

Fedora

dnf install libsigrok libsigrok-devel

macOS

brew install libsigrok

Windows

pre-built libsigrok dlls are shipped with this package.

Usage

from sigrok import Sigrok, ConfigKey

with (
    Sigrok() as sr,
    sr.get_driver("demo") as driver,
    driver.get_device() as device,
):
    device.set_config_uint64(ConfigKey.SR_CONF_SAMPLERATE, 1_000)
    device.set_config_uint64(ConfigKey.SR_CONF_LIMIT_SAMPLES, 10)
    device.enable_channels("D0")

    with sr.session(devices=[device]) as session:
        print(session.next_packet(timeout=1.0))
        print(session.next_packet(timeout=1.0))
        print(session.next_packet(timeout=1.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.

sigrok-0.1.1-py3-none-any.whl (10.3 MB view details)

Uploaded Python 3

File details

Details for the file sigrok-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sigrok-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sigrok-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1febc00a2f767419ba397d0d1318b41ee0343f8d28a458f4265ff18704601421
MD5 25fb11863817fb88de67f17b55630ac3
BLAKE2b-256 ef811b6d45a38d3a4e85bfee045e38953a6b5f1ccfdacd3d365ba42c7a79d1ed

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