Python module for reading and writing DBF files. Originally it was created by Jeff Kunce and later maintained by Hans Fiby.

Project Activity

See All Activity >

Categories

Database

License

Public Domain

Follow dbfpy

dbfpy Web Site

Other Useful Business Software
Open source. Easy to use. Proven. Complete. Icon
Open source. Easy to use. Proven. Complete.

End to end big data that enables you to spend less time formatting data and more time analyzing it.

Discover HPCC Systems - the truly open source big data solution that allows you to quickly process, analyze and understand large data sets, even data stored in massive, mixed-schema data lakes. Designed by data scientists, HPCC systems is a complete integrated solution from data ingestion and data processing to data delivery. The free online introductory courses and a robust developer community allow you to get started quickly.
Rate This Project
Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
4
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5

User Reviews

  • bug: if you can't write dbf file with IOError, use "rb+" : self.stream = file(f, ("r+b", "rb+")[bool(readOnly)]) enhance: you can save str to num(int or float) cells Fields.py------------------------- class DbfNumericFieldDef(DbfFieldDef): ..... def encodeValue(self, value): """Return string containing encoded ``value``.""" if isinstance(value, str): #print str(value)[:self.length].ljust(self.length) return str(value)[:self.length].rjust(self.length) else: _rv = ("%*.*f" % (self.length, self.decimalCount, value)) if len(_rv) > self.length: _ppos = _rv.find(".") if 0 <= _ppos <= self.length: _rv = _rv[:self.length] else: raise ValueError("[%s] Numeric overflow: %s (field width: %i)" % (self.name, _rv, self.length)) return _rv .....
  • Just what we needed to parse the DBF part of some shapefiles.
  • I found a bug ni you code.Like the following codes: from dbfpy import dbf db = dbf.Dbf("test.dbf", new=True) db.addField( ("BIRTHDATE", "D"), ) rec = db.newRecord() #year=1000 is before 1900; the datetime strftime() methods require year >= 1900 rec["BIRTHDATE"] = "10001010" rec.store() db.close() thanks
  • python 2.6 ok. has minor problems with Y2K+ dates. fix proposed (and can be applied on per-user basis) -- see project's tracker.
Read more reviews >

Additional Project Details

Intended Audience

Developers

Programming Language

Python

Database Environment

xBase

Related Categories

Python Database Software

Registered

2005-06-03