PyEDFlib -EDF/BDF Toolbox in Python

PyEDFlib is a free Open Source wavelet toolbox for reading / writing EDF/BDF files.

import pyedflib
import numpy as np
import os

file_name = os.path.join(pyedflib.util.test_data_path(),
f = pyedflib.EdfReader(file_name)
n = f.signals_in_file
signal_labels = f.getSignalLabels()
sigbufs = np.zeros((n, f.getNSamples()[0]))
for i in np.arange(n):
    sigbufs[i, :] = f.readSignal(i)


pyEDFlib is a python library to read/write EDF+/BDF+ files based on EDFlib.

EDF means [European Data Format]( and was firstly published [1992]( In 2003, an improved version of the file protokoll named EDF+ has been published and can be found [here](

The EDF/EDF+ format saves all data with 16 Bit. A version which saves all data with 24 Bit, was introduces by the compony [BioSemi](

The definition of the EDF/EDF+/BDF/BDF+ format can be found under [](

This python toolbox is a fork of the [toolbox from Christopher Lee-Messer]( and uses the [EDFlib]( from Teunis van Beelen. The EDFlib is able to read and write EDF/EDF+/BDF/BDF+ files.


It requires:


The most recent development version can be found on GitHub at

Latest release, including source and binary package for Windows, is available for download from the Python Package Index or on the Releases Page.


This code is licensed under the same BSD-style license that Teunis released edflib under and with the same disclaimer.