pyreaddbc

raw JSON →
1.2.0 verified Sat May 09 auth: no python

Pyreaddbc is a Python library for reading DBC files (compressed DBF files used by Brazilian healthcare systems) and converting them to DBF format. Current version 1.2.0, released on 2025-04-11, with monthly releases. Requires Python >=3.9.

pip install pyreaddbc
error ModuleNotFoundError: No module named 'readdbc'
cause Importing 'readdbc' directly instead of 'from pyreaddbc import readdbc'.
fix
Use 'from pyreaddbc import readdbc'.
error AttributeError: module 'pyreaddbc' has no attribute 'read_dbc_to_dbf'
cause Trying to import function from top-level package instead of submodule.
fix
Use 'from pyreaddbc.readdbc import read_dbc_to_dbf'.
error FileNotFoundError: [Errno 2] No such file or directory: 'input.dbc'
cause Invalid file path or file does not exist.
fix
Provide the full absolute path or ensure the file exists in the current working directory.
breaking In version 1.2.0, the function 'read_dbc' was removed. Use 'read_dbc_to_dbf' instead.
fix Replace 'read_dbc' with 'read_dbc_to_dbf'.
gotcha The returned object from 'read_dbc_to_dbf' is not a pandas DataFrame; it's a file path string (the output DBF file path).
fix Use the returned path to read the DBF file with another library (e.g., dbfread or pandas).
deprecated Python 3.8 is no longer supported; Python >=3.9 required.
fix Upgrade Python to 3.9 or higher.

Convert a DBC file to DBF format. Input and output are file paths.

from pyreaddbc.readdbc import read_dbc_to_dbf
read_dbc_to_dbf('input.dbc', 'output.dbf')
print('Conversion complete')