📚 dbfread2
🚀 A modern Python library for reading DBF files with elegance and type safety
dbfread2 is a modern, type-safe Python library for reading DBF files (dBase, Visual FoxPro, FoxBase+) with zero external dependencies.
✨ Highlights
- 🐍 Modern Python 3.12+ implementation
- 🔍 Comprehensive type hints
- 🛠️ Simple yet powerful API
- 📁 Native
pathlib.Pathsupport - 🔄 Streaming and memory-loaded modes
- 📝 Support for all major DBF variants
- 📋 18 field types with extensible
FieldParser - 📎 Reads
FPTandDBTmemo files - 🔒 Type-safe operations
🚀 Quick Start
from dbfread2 import DBF
# Stream records (memory-efficient)
for record in DBF('people.dbf'):
print(record)
# {'NAME': 'Alice', 'BIRTHDATE': datetime.date(1987, 3, 1)}
# {'NAME': 'Bob', 'BIRTHDATE': datetime.date(1980, 11, 12)}
# Load all records into memory
table = DBF('people.dbf', load=True)
print(table.records[0]['NAME']) # Returns: 'Alice'
📦 Installation
pip install dbfread2
🔄 Migration from dbfread
Key Changes
-
Python Version
- ✅ Python 3.12+ required
- ❌ No support for older versions
-
Import Updates
# Before ❌ from dbfread import DBF # After ✅ from dbfread2 import DBF
-
Modern Parameter Names
# Before ❌ DBF('file.dbf', recfactory=dict, lowernames=True) # After ✅ DBF('file.dbf', record_factory=dict, lowercase_names=True)
-
Path Support
# ✨ New Feature from pathlib import Path DBF(Path('data/file.dbf'))
🛠️ Development
Setup
-
Install Tools
- mise-en-place for environment management
- uv for package management
-
Clone & Setup
git clone https://github.com/wasdee/dbfread2.git cd dbfread2 mise install uv pip install -e ".[docs]"
📚 Documentation
mise run docs:build # Build docs
mise run docs:serve # Serve locally
mise run docs:watch # Watch mode
mise run docs:check # Check for issues
✅ Code Quality
📄 License
MIT License
🙏 Credits
Fork of dbfread by Ole Martin Bjørndalen
📬 Contact
Nutchanon Ninyawee - me@nutchanon.org
⭐️ If this project helps you, consider giving it a star!
Metadata
Release files for dbfread2 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dbfread2-0.1.0.tar.gz | 46.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbfread2-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.5 kB
Release files / dbfread2-0.1.0.tar.gz
| Download URL | dbfread2-0.1.0.tar.gz |
|---|---|
| Size | 46.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0c0c428085a9449bc091863563c3ff4742f15e248097ab2364e7f2f8a66e66c
|
|
BLAKE2b-256 checksum How to use checksums |
a92dfece2942e2fe97936fd5ede5c20070ff507ee2c52da21ba86ba4eeafaba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|
Release files / dbfread2-0.1.0-py3-none-any.whl
| Download URL | dbfread2-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5a42675052ef3e3b4d0f52736942008e8c290471722331b1ab14886636c1cfb
|
|
BLAKE2b-256 checksum How to use checksums |
9ca08bf7fdc48f0fb150a8dccfff31186b21cc0348cbed481bd8b9f9bcea006d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|
Security for dbfread2 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.