Skip to content

esparta/dbfkit

Repository files navigation

dbfkit

https://travis-ci.org/esparta/dbfkit.png?branch=master https://coveralls.io/repos/esparta/dbfkit/badge.png

DBF classes and utilities. For humans

Features

  • Console Scripts:
    • dbf2csv: Export a DBF file to csv (utf-8 encoding)
  • Classes:
    • DBFUtils: Read a DBF and exposes as a csv file

How to use it

As a Console script:

$ dbf2csv --help
Usage: dbf2csv [OPTIONS] INPUTFILE [OUTPUT]

  Convert a DBF file to csv on desired output (stdout by default)

Options:
  -c, --codepage TEXT  Use specific codepage, if not supplied, use the table's
                       codepage
  --version            Show the version and exit.
  --help               Show this message and exit.

As a module:

from dbfkit import DBFUtils
from cStringIO import StringIO

stream = StringIO()
records = DBFUtils.tocsv("data/catalogo.dbf", output=stream)
print("Records: {records}".format(records=records))
print(stream.getvalue())

Credits

About

Modules & script to work with DBF files.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors