Install & Compatibility
Where this runs
tested against v0.2.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.464s · 53.4MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.5s · import 0.402s · 54MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
agate
✓ import agate
Required for `agate.Table` functionality.
agatedbf
✓ import agatedbf
Importing `agatedbf` enables the `from_dbf` method on `agate.Table`.
This quickstart demonstrates how to load a DBF file into an `agate.Table` using the `from_dbf` method. Ensure you have a `.dbf` file available; a simple way to create one for testing is provided in the comments.
import agate
import agatedbf
import os
# Create a dummy .dbf file for demonstration purposes
# In a real scenario, you would already have a .dbf file.
# For local testing, you might use a library like `dbf` or create one manually.
# Example: (requires `pip install dbf`)
# import dbf
# db = dbf.Table('test.dbf', 'name C(15); age N(3,0)')
# db.open()
# db.append({'name': 'Alice', 'age': 30})
# db.append({'name': 'Bob', 'age': 24})
# db.close()
# Ensure a dummy dbf file exists for this example to run.
# We'll simulate this by checking for a non-existent file path
# or asking the user to create one.
dbf_path = 'test.dbf'
if not os.path.exists(dbf_path):
print(f"Please create a dummy DBF file named '{dbf_path}' with some data.")
print("You can use `dbf` library for this (pip install dbf) or any other DBF creator.")
print("Example: `db = dbf.Table('test.dbf', 'name C(15); age N(3,0)'); db.open(); db.append({'name': 'Alice', 'age': 30}); db.close()`")
else:
table = agate.Table.from_dbf(dbf_path)
print("Table loaded successfully:")
table.print_structure()
table.print_table(max_rows=5)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'agate-dbf'
The 'agate-dbf' package is not installed in the Python environment.
fixInstall the package using pip: 'pip install agate-dbf'.
ImportError: cannot import name 'from_dbf' from 'agate'
The 'from_dbf' method is not part of the 'agate' module; it is provided by the 'agate-dbf' extension.
fixEnsure 'agate-dbf' is installed and import it alongside 'agate': 'import agate; import agatedbf'.
AttributeError: module 'agate' has no attribute 'from_dbf'
The 'from_dbf' method is not an attribute of the 'agate' module; it is added by the 'agate-dbf' extension.
fixImport 'agate-dbf' to add 'from_dbf' support: 'import agate; import agatedbf'.
TypeError: from_dbf() missing 1 required positional argument: 'path'
The 'from_dbf' method requires a file path argument to specify the DBF file to read.
fixProvide the path to the DBF file when calling 'from_dbf': 'table = agate.Table.from_dbf('path/to/file.dbf')'. ValueError: Unsupported DBF file encoding
The DBF file uses an encoding that is not supported or recognized.
fixSpecify the correct encoding when calling 'from_dbf': 'table = agate.Table.from_dbf('file.dbf', encoding='utf-8')'. Upgrade
Version history
0.2.4latest on PyPI · released Dec 15, 2025
Audit
Dependencies
agaterequiredCore data analysis library extended by agate-dbf.
dbfreadrequiredUnderlying library used for parsing DBF files.
isodaterequiredUsed for parsing ISO 8601 formatted dates and times within DBF files.