dbf
Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files (including memos)
What it is and what it does
dbf is a pure-Python library for reading and writing dBase, FoxPro, Visual FoxPro, and Clipper .dbf files. It maps legacy DBF field types (Character, Date, Logical, Memo, Numeric, Currency, DateTime, etc.) to native Python types like str, datetime.date, bool, and decimal.Decimal. The package represents tables as Table objects and individual rows as Record objects, supporting sequence, mapping, and attribute access protocols, plus context managers for automatic file handling.
The library is primarily used for retrieving and migrating legacy data from old database systems into modern storage, and for working with specialized applications like GIS software and personal finance tools that still use DBF format. It supports both on-disk and in-memory tables, custom data types with special semantics (like tri-state Logical values), and nonpersistent indexing.
Use it for:
- Migrate legacy dBase or FoxPro data into a modern relational database or data warehouse
- Read DBF files exported from GIS software or genealogy applications for data analysis
- Parse and transform historical business records stored in Clipper or Visual FoxPro format
- Create or modify DBF files programmatically for integration with legacy systems
- Build data pipelines that consume DBF exports from stand-alone applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes dBase III, FoxPro, Visual FoxPro, and Clipper .dbf database files, converting between legacy DBF formats and Python data types.
Yes, if you need to work with legacy DBF files. The package has low install friction, no known vulnerabilities, and a permissive license. However, maintenance is aging (last release 346 days ago), so verify compatibility with your specific Python version and DBF variant before committing to production use. It is well-suited for one-off migrations and data retrieval tasks.
Install
dbf on PyPI
pip
pip install dbfuv
uv add dbfpoetry
poetry add dbfInstalling dbf
Before you install
Low friction install with a single lightweight dependency (aenum). Last release was 346 days ago; the repository is active and not archived, though the project shows aging maintenance patterns.
License in practice
BSD License (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
import dbf
table = dbf.Table('myfile.dbf', codepage='utf8', on_disk=True)
table.open()
for record in table:
print(record.field_name)
Verify before relying
- Whether the package works reliably with modern Python versions (3.10+) despite aging maintenance status
- Performance characteristics when handling large DBF files or many concurrent operations
- Compatibility with all Visual FoxPro and Clipper field types in real-world legacy databases
Package facts
| License | BSD License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — aenum |
| Maintenance | aging — 346 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,808/month — #13,970 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dbf-0.99.11-py2-none-any.whl; dbf-0.99.11-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbfreadReads DBF database files (dBase, Visual FoxPro,…
permissive · top 5,000 on PyPI
agate-dbfAdds read support for DBF (dBASE) files to the…
permissive · top 15,000 on PyPI
pandavroReads and writes Apache Avro files to and from…
permissive · top 15,000 on PyPI
canmatrixCanmatrix parses, manipulates, and converts CAN…
permissive · top 5,000 on PyPI
backports.csvProvides Python 3's csv module API for Python…
unclear · top 15,000 on PyPI
pyshpPyShp reads and writes ESRI Shapefiles in pure…
permissive · top 5,000 on PyPI
pyorcPyORC reads and writes Apache ORC files using…
permissive · top 15,000 on PyPI
avro-gen3Generates typed Python record classes and a…
permissive · top 5,000 on PyPI
tablibTablib converts tabular data between multiple…
permissive · top 5,000 on PyPI
sas7bdatReads SAS7BDAT files (SAS statistical software…
permissive · top 15,000 on PyPI