Skip to main content

pycosdk

Yet another wrapper for the PicoSDK.

pycosdk is a thin, fully type-annotated ctypes binding to Pico Technology's PicoScope driver libraries. It stays deliberately close to the C API: method names mirror the driver functions, and the enums and structs are transcribed from the SDK headers as IntEnum/IntFlag and ctypes.Structure types.

Requirements

  • Python 3.11+
  • The PicoSDK drivers, installed separately. pycosdk does not bundle or install them — it locates the shared libraries at runtime via ctypes.util.find_library. Download them from picotech.com/downloads.

Installation

pip install pycosdk

Supported drivers

Driver Wrapper class
ps3000a PicoScope3000aWrapper
ps5000a PicoScope5000aWrapper
ps6000 PicoScope6000Wrapper
ps6000a PicoScope6000aWrapper
psospa PicoScope3000eWrapper

Coverage is not exhaustive — each wrapper binds the subset of the driver API that has been needed so far.

Usage

Instantiating a wrapper loads the corresponding shared library. Pass an explicit library_path if it is not on the default search path; otherwise a MissingLibraryException is raised when the library cannot be found.

Methods return the driver's PICO_STATUS as an enum member, followed by any output parameters. Statuses are returned, not raised — check them yourself.

from pycosdk import (
    PICO_BANDWIDTH_LIMITER,
    PICO_CHANNEL,
    PICO_CONNECT_PROBE_RANGE,
    PICO_COUPLING,
    PICO_DEVICE_RESOLUTION,
    PICO_STATUS,
    PicoScope6000aWrapper,
)

scope = PicoScope6000aWrapper()

status, handle = scope.ps6000aOpenUnit(None, PICO_DEVICE_RESOLUTION.PICO_DR_8BIT)
assert status == PICO_STATUS.PICO_OK

status = scope.ps6000aSetChannelOn(
    handle,
    PICO_CHANNEL.PICO_CHANNEL_A,
    PICO_COUPLING.PICO_DC_50OHM,
    PICO_CONNECT_PROBE_RANGE.PICO_X1_PROBE_1V,
    0.0,
    PICO_BANDWIDTH_LIMITER.PICO_BW_FULL,
)

scope.ps6000aCloseUnit(handle)

Type checking

The package ships a py.typed marker, so annotations are visible to mypy, pyright, and friends.

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for pycosdk 0.0.12

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

Source distribution (sdist)

Source distribution for pycosdk 0.0.12
File Size Uploaded Provenance
pycosdk-0.0.12.tar.gz 39.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 88.3 kB

Release files / pycosdk-0.0.12.tar.gz

Download URL pycosdk-0.0.12.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ee9070e9151fa8431c35cda6eb35c0133aca0745c81d69fbc4c59792c115b0fd
BLAKE2b-256 checksum
How to use checksums
14289684b0848438c4df8d14d13b711792f23ec6a54349ad0e635d68fc7ac312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / pycosdk-0.0.12-py3-none-any.whl

Download URL pycosdk-0.0.12-py3-none-any.whl
Size 49.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9219f7d574188370b05739449a7d25405a08d472927d20feac41be628ed763de
BLAKE2b-256 checksum
How to use checksums
37bad1d3d4f4a5117223500142f054b12549d677d73732da684a2411f988413a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for pycosdk 0.0.12

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.

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