--- id: pymatreader version: "1.2.3" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # pymatreader — Convenient reader for Matlab mat files License: permissive · Maintenance: active · Downloads: 129.3K/mo ## What it is and what it does pymatreader is a Python module that reads MATLAB .mat files and converts them into Python dictionaries. It handles both the older MATLAB format (versions before 7.3) and the newer HDF5-based format (>= 7.3), returning the same dictionary structure regardless of which format the input file uses. The package depends on h5py, numpy, scipy, and xmltodict to handle the underlying file parsing and data conversion. It requires Python >= 3.10 and is classified as production-stable. The typical workflow is a single import and one function call to load an entire .mat file into memory as a dictionary. Use it for: - Load MATLAB simulation or analysis results into Python for further processing or visualization. - Migrate legacy MATLAB datasets into Python-based data pipelines without manual format conversion. - Read HDF5-based .mat files from modern MATLAB versions in scientific computing workflows. - Extract variables from .mat files for use in machine learning or statistical analysis with numpy and scipy. - Batch import multiple MATLAB files in research or engineering automation scripts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads MATLAB .mat files in both legacy and HDF5-based formats (>= 7.3) and returns their contents as Python dictionaries. Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a specific, well-defined problem. Choose it if you need to read MATLAB files in Python. ## Install pip install pymatreader uv add pymatreader poetry add pymatreader ## Installing pymatreader Before you install: Low friction: pure Python wheel with four well-established scientific dependencies. Actively maintained with a release 102 days ago. License in practice: BSD-2-Clause permissive license allows free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects. Quickstart: pip install pymatreader from pymatreader import read_mat data = read_mat(filename) # data is a dict containing all variables from the mat file Requires Python >= 3.10 ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 129.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags read matlab mat files, matlab file parser python, hdf5 mat file reader, matlab data import, convert mat to python dict, matlab-interop, scientific-data [View on SkillFed](https://skillfed.io/packages/pymatreader) · [View on PyPI](https://pypi.org/project/pymatreader/)