Skip to main content

Python-API for libsigrok

Project description

python-sigrok

Python-API for libsigrok

Installation

pip install -i https://test.pypi.org/simple/ 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.0-py3-none-any.whl (10.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigrok-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0e42baa802e2e18e527152d0c1e06433dc358dcdc8ab62c5f33f24505b8a48e
MD5 5e379ad6a6051a5ccb04138f7cca346b
BLAKE2b-256 b414e7e7c8f810b262ac586d83b809b4b4fe0154746d10aad56912d88a92dc8e

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