Skip to main content

gw-instek-asr-3000

A pure-Python driver for the GW Instek ASR-3000 series programmable AC/DC power source (ASR-3200, ASR-3300, ASR-3400, ASR-3400HF). The MVP communicates with the instrument over Ethernet using a raw TCP SCPI socket.

Unofficial project. This software is not affiliated with, endorsed by, or in any way connected to Good Will Instrument Co., Ltd. ("GW Instek"). It is an independent, community-written driver created by reverse-engineering the publicly available programming manual. "GW Instek" and "ASR" are trademarks of their respective owners and are used here only to identify the hardware this driver targets.

Features

  • Zero runtime dependencies (stdlib socket only).
  • Full SCPI command set from the ASR-3000 Programming Manual (Rev. E): IEEE 488.2 common commands, output, source, measure, system, status, sequence, simulation, data/trace, memory, input and display subsystems.
  • Type-safe enums for enumerated parameters, with forgiving int / str / Enum input coercion.
  • Binary arbitrary-waveform transfer (:DATA:TRACe:WAVe block data).
  • Context-manager and connection management, with clear exception types.

Installation

pip install -e .          # development install
pip install -e ".[dev]"   # include pytest

Requires Python 3.10+.

Quick start

The ASR-3000 socket server port is fixed at 2268.

from gw_instek_asr import ASR3300, OutputMode, Waveform

with ASR3300("192.168.1.100") as asr:
    print(asr.identify())               # Identification(model='ASR-3300', ...)

    asr.mode(OutputMode.AC_INT)         # AC-INT output mode
    asr.waveform(Waveform.SIN)          # sine wave
    asr.voltage(230.0)                  # 230 Vrms
    asr.frequency(50.0)                 # 50 Hz
    asr.output_on()

    print("Vrms =", asr.voltage_rms())  # measured voltage
    print("Irms =", asr.current_rms())

ASR3000 (the series) and ASR3300 (the 3000 VA model) expose the same API.

API conventions

  • Get/set pattern. A method sets when given a value and queries when called with no arguments:

    asr.voltage(120.0)     # :VOLTage 120.0
    asr.voltage()          # :VOLTage?  -> 120.0
    
  • Enums. Enumerated parameters accept an enum member, an integer, or a mnemonic string and are returned as enum members:

    asr.mode("ACDC-INT") is OutputMode.ACDC_INT
    
  • Booleans accept True/False, 1/0, or "ON"/"OFF".

  • MIN/MAX. Numeric setters pass the mnemonics through:

    asr.voltage("MAX")
    

Raw command access

Anything not covered by a typed helper can be sent directly:

asr.write(":SOURce:VOLTage 120.0")
value = asr.query(":SOURce:VOLTage?")

Testing

The test suite uses an in-memory fake transport for command encoding plus a local TCP socket server to exercise the real transport end-to-end.

python -m pytest

Publishing to PyPI

Publishing is handled by .github/workflows/publish.yml, which builds the sdist/wheel, runs the test suite, and publishes to PyPI when you push a tag like v0.1.0 (or trigger the workflow manually). Configure one of:

  • Trusted publishing (recommended): in PyPI → Publishing, add a trusted publisher for this repo (owner fuubox, repo gw-instek-asr-3000); no secrets required.
  • API token: add a repository secret named PYPI_API_TOKEN and, in the workflow, pass password: ${{ secrets.PYPI_API_TOKEN }} to the pypa/gh-action-pypi-publish step.

License

Zero-Clause BSD (0BSD) — see LICENSE. Completely open source and free to use, modify, and redistribute, with or without fee, for any purpose. Attribution is appreciated but not required.

Metadata

Release files for gw-instek-asr-3000 0.1.1

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

Source distribution (sdist)

Source distribution for gw-instek-asr-3000 0.1.1
File Size Uploaded Provenance Actions
gw_instek_asr_3000-0.1.1.tar.gz 25.7 kB With provenance Details for gw_instek_asr_3000-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gw-instek-asr-3000 0.1.1
File Interpreter ABI Platform Actions
gw_instek_asr_3000-0.1.1-py3-none-any.whl Python 3 none any Details for gw_instek_asr_3000-0.1.1-py3-none-any.whl

Total release size: 52.0 kB

Release files / gw_instek_asr_3000-0.1.1.tar.gz

Download URL gw_instek_asr_3000-0.1.1.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e77baa05054aa0b1cba39133476cb1de83d3b26757ab19b5ecbd49d2bd9c7e87
BLAKE2b-256 checksum
How to use checksums
12cabbf57d18fbc0b59a6d7447e780853839bc5582c9eb1626612df990e140e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / gw_instek_asr_3000-0.1.1-py3-none-any.whl

Download URL gw_instek_asr_3000-0.1.1-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b90a32960aa7ebcbe92fb5cb271ba4c9f35f408dbf7e069619c71f3e528761d3
BLAKE2b-256 checksum
How to use checksums
f3aea3d4661e884b6e514f399143c54a93e0ac9ffde961573c883adca4859748
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Security for gw-instek-asr-3000 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gw_instek_asr_3000-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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