Skip to main content

A Python toolbox for visual and auditory stimulation based on pyglet and pylsl.

Project description


pyReiz is a low-level auditory and visual stimulus presentation suite wrapping pyglet, sending markers via a pylsl outlet. You can also read more extensive documentation online.

DOI MIT license PyPI version Build Status Coverage Status Documentation Status



The requirements for pyReiz are pyglet and pylsl. They are checked, and if necessary installed, during pip install. There is also a dependency on pyttsx3 to allow on-demand synthesis of auditory cues from text. If you don't need that or can't acquire a version of pyttsx3 for your architecture, install pyreiz without the [tts] suffix.


pip install Reiz[tts]


The most recent version of pylsl is not yet on pypi. A solution is to install libsl manually. You download a recent build of liblsl from Afterwards, install pylsl directly from github.

pip install git+
pip install Reiz[tts]


On Mac, tts and reiz-marker are not supported. These functionalities will be mocked, so at least, you can develop on Mac to deploy on Linux or Windows.

pip install Reiz


git clone
cd pyreiz
pip install -e .[tts]

Test your installation

After you installed Reiz, you can give it a test-run by calling python -m reiz.examples.basic from your terminal. This should start a throwaway MarkerServer, and present a series of visual and auditory stimuli. If anything does not work out, inform us of the issue.

Additional Information

Create your own experiment

Examples can be found in reiz/examples. A quite extensively documented basic example can be found here: basic example.


Because all markers are send via LSL, i suggest recording with Labrecorder. Use at least 1.13, as this version supports BIDS-conform recording, offers a remote interface and has a critical timing bugfix included.


The key requirements for pyReiz are pyglet and pylsl. We require pylsl>=1.13 because a timing issue was fixed in that version (see, and pyglet>1.4 because there was a breaking change between 1.3 and 1.4 in the way audio was generated and played (see For text-to-speech, which is included with [tts], a key requirement is pyttsx3.


I adapted code from Cocos2d for generation of some openGL primitives.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Reiz, version
Filename, size File type Python version Upload date Hashes
Filename, size Reiz- (61.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Reiz- (56.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page