Pywfdb is a Python module for accessing PhysioBank database of physiologic signals. It wraps WFDB library, providing easy, Object-Oriented interface.

Table of Contents

1.   Download

Current, initial release of pywfdb is available for download:

There is also precompiled binary version for Windows.


2.   Install

If you want to instal pywfdb from source you need to download WFDB library source code. Direct link to the latest version is

After downloading you have to:

  1. Unpack WFDB library files, preferably to pywfdb directory.

  2. Configure WFDB library with --without-netfiles switch, for example:

    ./configure --without-netfiles --static --static_only --prefix=. --mandir=.
  3. Edit paths in to point to WFDB lib source and header files. If You have unpacked files to wfdbpy directory, the defaults should work.

  4. execute python script:

    python install

3.   Documentation

Sample Python session with pywfdb may look like this:

>>> import pywfdb
>>> record = pywfdb.Record("d:/mitdb/100")
>>> print record.signal_names
('MLII', 'V5')
>>>'MLII', 1018, 5) # read 5 samples beggining from sample 1018
[-0.38, -0.375, -0.375, -0.375, -0.375]
>>> annotation = record.annotation()
>>> for ann in, int(record.frequency) * 2): # read two first seconds
...     print ann.time, ann.type, ann.typestr, ann.isqrs, ann.description
18 28 + False Rhythm change
77 1 N True Normal beat
370 1 N True Normal beat
662 1 N True Normal beat

See also module documentation generated from Pyrex source or check out some examples:

4.   License

Pywfdb is licensed under GPL license.

5.   Contact

If you need support, have improvement proposal or just using this library in your software, feel free to contect me directly.

Filip Wasilewski, <>