--- id: pyedflib version: "0.1.42" license: BSD license_treatment: permissive maintenance: active --- # pyEDFlib — library to read/write EDF+/BDF+ files License: permissive · Maintenance: active · Downloads: 138.9K/mo ## What it is and what it does pyEDFlib is a Python wrapper around EDFlib that reads and writes European Data Format (EDF, EDF+) and BioSemi Data Format (BDF, BDF+) files—standard formats for storing biomedical signals like EEG, ECG, and EMG recordings. The library wraps a C implementation for performance and provides both low-level access and a high-level interface for common tasks. It depends only on numpy and runs on Python 3.8 and later across Windows, macOS, and Linux. The high-level interface makes it straightforward to load signal arrays with metadata, write new files with channel definitions, and perform file operations like dropping channels, renaming them, anonymizing patient data, and comparing file contents. It is commonly used in neuroscience, sleep medicine, and clinical research workflows where EDF/BDF files are the de facto standard for storing and sharing polysomnography, EEG, and other multi-channel physiological recordings. Use it for: - Load EEG recordings from clinical polysomnography devices and extract specific channels for analysis. - Write processed biomedical signals back to EDF+ format for archival or sharing with research teams. - Anonymize patient identifiers in EDF files before sharing data for research or regulatory compliance. - Rename and reorganize channels within existing EDF files without re-encoding the signal data. - Batch convert or validate EDF/BDF files by comparing file contents programmatically. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyEDFlib reads and writes EDF+/BDF+ biomedical signal files, with support for channel manipulation, anonymization, and metadata handling. Yes. pyEDFlib is actively maintained, has no known vulnerabilities, and is the standard choice for EDF/BDF file I/O in Python. Medium install friction is offset by prebuilt wheels for common platforms and a single, lightweight numpy dependency. Install it if you work with biomedical signal files in these formats. ## Install pip install pyedflib uv add pyedflib poetry add pyedflib ## Installing pyEDFlib Before you install: Medium install friction due to compiled C extensions, but prebuilt wheels cover Python 3.10, 3.11, and 3.12 on major platforms (macOS, Linux, Windows). Repository is actively maintained with recent commits and no known vulnerabilities. License in practice: BSD permissive license allows commercial and private use with minimal restrictions; attribution required but no copyleft obligations. Quickstart: pip install pyEDFlib from pyedflib import highlevel import numpy as np signals = np.random.rand(2, 256) headers = highlevel.make_signal_headers(['ch1', 'ch2'], sample_frequency=256) header = highlevel.make_header(patientname='patient1') highlevel.write_edf('output.edf', signals, headers, header) signals_read, sig_headers, file_header = highlevel.read_edf('output.edf') Requires a C compiler and Cython to build from source; binary wheels available for common platforms reduce this friction. Verify before relying: - Whether the package handles large files efficiently or has known memory constraints. - Real-world performance on concurrent read/write operations or thread safety guarantees. - Compatibility with EDF+ extensions beyond the standard (e.g., annotations, event markers). ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 138.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags EDF file reader writer, biomedical signal format, EDF+ BDF+ Python, European data format library, EEG data file handling, medical signal processing files, time series biomedical data, biomedical-signals, file-format, eeg-data [View on SkillFed](https://skillfed.io/packages/pyedflib) · [View on PyPI](https://pypi.org/project/pyedflib/)