Python Bindings for Digilent WaveForms API
Project description
Python Bindings for Digilent WaveForms API
DwfPy is a Python package that allows you to access Digilent WaveForms devices via Python. It provides a low-level API with complete access to the Digilent WaveForms API, and also a simple but powerful high-level API, which allows you to configure WaveForms devices with a single statement.
For instance, to output a 1kHz sine-wave on a Analog Discovery 2, you can simply write:
import dwfpy as dwf
with dwf.AnalogDiscovery2() as device:
print('Generating a 1kHz sine wave on WaveGen channel 1...')
device.analog_output['ch1'].setup('sine', frequency=1e3, amplitude=1, start=True)
input('Press Enter key to exit.')
Features
- Pythonic abstraction of Digilent Waveforms API.
- Low-level API with complete access to the Digilent Waveforms API.
- Powerful high-level API that supports one-line configuration statements.
- Supports all sub-modules, such as oscilloscope, arbitrary waveform generator, logic analyzer, pattern generator, digital I/O, and power supplies.
- Works with all WaveForms devices, such as the Analog Discovery 2, the Analog Discovery 3, or the Digital Discovery.
Installing DwfPy
You can install the DwfPy package from PyPI using pip:
pip install dwfpy
In order to use the DwfPy package, you need Python 3.8 or higher.
As DwfPy builds on top of the WaveForms API, you need to install the WaveForms software, which includes the required runtime components to access the WaveForms devices.
The source code for the DwfPy package can be found at GitHub at https://github.com/mariusgreuel/dwfpy.
Examples
You can find Python examples using DwfPy in the dwfpy GitHub repository at https://github.com/mariusgreuel/dwfpy/tree/main/examples.
Documentation
You can find the DwfPy user's guide at https://dwfpy.readthedocs.io/.
Detailed information about the Digilent Waveforms API is available from the Digilent WaveForms SDK Reference Manual.
Getting help
For issues with DwfPy, please visit the dwfpy issue tracker.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dwfpy-1.1.3.tar.gz
.
File metadata
- Download URL: dwfpy-1.1.3.tar.gz
- Upload date:
- Size: 52.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9539264a0ca61ab66bb61119b4e8bf243fbad3cefbb8578ac4b3c42895dd38a0 |
|
MD5 | 622b255242b9add64cd19a202f1cd10f |
|
BLAKE2b-256 | 627f8987894cfe4b2087a838787b3fca27c6fcb2a7707914e003dee3c77c0307 |
File details
Details for the file dwfpy-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: dwfpy-1.1.3-py3-none-any.whl
- Upload date:
- Size: 59.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 247089e456b6b89d24da389b02448927298f3f10b54d94ee20174bf3060a840c |
|
MD5 | 522a28172934e334b24bc75d099ac7ac |
|
BLAKE2b-256 | 892fdf9943a603f01e5d0e54197e5dbff93074b7394c07f988e8aefafd7b7c8f |