PyEDFlib -EDF/BDF Toolbox in Python

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

import pyedflib
import numpy as np

file_name =
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/EDF+/BDF files based on EDFlib.

EDF stands for European Data Format, a data format for EEG data, first published in 1992. In 2003, an improved version of the file protocol named EDF+ has been published.

The definition of the EDF/EDF+ format can be found under

The EDF/EDF+ format saves all data with 16 Bit. A version of the format which saves all data with 24 Bit, called BDF, was introduced by the company BioSemi.

The PyEDFlib Python toolbox is a fork of the python-edf toolbox from Christopher Lee-Messer. and uses the EDFlib from Teunis van Beelen.


PyEDFlib requires:


The most recent development version can be found on GitHub at

The 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.