Welcome to g.Pype!

Powered by g.tec PyPI Python Tests Coverage License Documentation

g.Pype is a Python Software Development Kit (SDK) for building neuroscience and Brain-Computer Interface (BCI) applications. It is designed to be simple to use, with a clear and well-documented coding interface with many examples that help you get started quickly. It provides essential building blocks that can be combined and adapted to your needs, while remaining open to integration with other Python packages. g.Pype runs pipelines in real time or offline over a recording, on Windows, macOS and Linux.

What’s new in version 4

Version 4 is a large release, and parts of it break 3.x code: the Changelog says what to change.

  • Offline processing: Pipeline.run() drives a whole recording through a pipeline, and a Collector hands back the data with its rate and channel labels.

  • Record and replay: save_as records what every source produced, and load_from replays it through the same pipeline, in real time or as a batch.

  • Four recording formats: CSV, MATLAB v7.3, HDF5 and EDF+, each written and read back.

  • A layered install: pip install gpype is what a server needs, without the GUI, the device drivers, LSL or the non-CSV formats; pip install "gpype[all]" installs what it used to.

  • Linux joins Windows and macOS, and Python 3.14 is supported.

  • g.USBamp joins the supported amplifiers, and OSCAR artifact removal works on all five.

  • Ten new nodes, among them Reference, BandPower, Threshold and EpochAverage.

  • A pipeline that cannot work is refused at start(), naming the node, instead of starting a scope that never updates.

What’s new in version 4.1

Every source, sink and widget is now the node itself: the pipeline builds the chain around it, and a custom one is a single class. One serialized pipeline can assign each of them to an edge with edge_id, and each edge builds only its own part. Events that arrive before a device’s first samples are no longer lost, and a server takes each stream from one sender. A frozen application runs only with a g.tec device attached, a licence lifts the non-commercial mark, and gp.deployment_report() tells a build tool what the licence gate would grant. See the Changelog for details.

Quickstart

Install gpype and clone the GitHub repository:

pip install "gpype[all]"
git clone https://github.com/gtec-medical-engineering/gpype.git

g.Pype supports Python 3.10 to 3.14. On Windows with Python 3.13 or 3.14, gpype[all] leaves out EDF support, because its package, pyedflib, publishes no wheel there; pip install "gpype[formats]" adds it where Microsoft C++ Build Tools are installed.

Navigate to the subfolder ./gpype/examples and run the example scripts directly from your IDE (e.g., VS Code, PyCharm, …). Make sure to familiarize yourself with the Basic Concepts and then dive into the g.Pype Training. Have fun!