Skip to main content

PyPulsePal

PyPI

Python API for the PulsePal open-source pulse train generator.

→ Full documentation

Example usage

Load and apply a saved config file:

from pypulsepal import PulsePal
from pypulsepal.config_io import load_config

cfg = load_config("my_params.json")   # or .yaml
with PulsePal.from_config(cfg, serial_port="/dev/ttyACM0") as pp:
    pp.trigger_selected_channels(channel_1=True)

Standard instantiation:

import time
from pypulsepal import PulsePal

pp = PulsePal(serial_port="/dev/ttyACM0")
pp.channel_configs[0].phase1Voltage = 5.0
pp.channel_configs[0].pulseTrainDuration = 1.0
pp.sync_all_params()
pp.trigger_selected_channels(channel_1=True)
time.sleep(1)
pp.stop_all_outputs()
pp.close()

As a context manager (saves settings and closes on exit automatically):

import time
from pypulsepal import PulsePal

with PulsePal(serial_port="/dev/ttyACM0") as pp:
    pp.channel_configs[0].phase1Voltage = 5.0
    pp.channel_configs[0].pulseTrainDuration = 1.0
    pp.sync_all_params()
    pp.trigger_selected_channels(channel_1=True)
    time.sleep(1)
    pp.stop_all_outputs()

Installation

pip install pypulsepal

With YAML config file support:

pip install "pypulsepal[yaml]"

From source:

git clone https://github.com/murineshiftwork/pypulsepal.git
cd pypulsepal
pip install -e ".[yaml]"

Citation

To cite PyPulsePal, reference the GitHub repository:

Rollik, Lars B. PyPulsePal: Python API for the PulsePal open-source pulse train generator. https://github.com/murineshiftwork/pypulsepal

Please also cite the original PulsePal hardware and PyBpod publications that this package builds on.

License & sources

This software is released under the GNU GPL v3.0.

This work is derived from the Sanworks PulsePal Python API (commit: 5bb189f).

src/pypulsepal/_arcom.py is vendored from pybpod-api 1.8.2 (MIT, Copyright © 2016 Champalimaud Foundation) with minor adaptations.

Useful references

Metadata

Release files for pypulsepal 0.4.7

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

Source distribution (sdist)

Source distribution for pypulsepal 0.4.7
File Size Uploaded Provenance Actions
pypulsepal-0.4.7.tar.gz 20.7 kB Without provenance Details for pypulsepal-0.4.7.tar.gz

Built distribution (wheel)

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

Total release size: 37.3 kB

Release files / pypulsepal-0.4.7.tar.gz

Download URL pypulsepal-0.4.7.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1ac7d91a873692be6e6b81db76d829839e2f2ba02a41f181bc5d33e7d8e75db6
BLAKE2b-256 checksum
How to use checksums
5514c32df13de65a820aae0b7e389a95208a719734fac1e4019e078558e2f75c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pypulsepal-0.4.7-py3-none-any.whl

Download URL pypulsepal-0.4.7-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fab47ae4ba99d4fb1b2921db3452439b67ca7afb1cb9d6605b19acf5ec42dc48
BLAKE2b-256 checksum
How to use checksums
faa4f2e1a925edc69eeb5b7f3f78f7400671382faba2ac5f8cdd1e70ad03e3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pypulsepal 0.4.7

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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