Light and easy DBF reader
Project description
https://github.com/idlesign/dbf_light
Description
Light and easy DBF reader
No fancy stuff, just DBF reading for most common format versions.
Python 2.7, 3.4+;
Uses namedtuple for row representation and iterative row reading to minimize memory usage;
Works fine with cyrillic (supports KLADR and CBRF databases);
Reads .dbf from zip files.
API
from dbf_light import Dbf
with Dbf.open('some.dbf') as dbf:
for field in dbf.field:
print('Field: %s' % field)
print('Rows (%s):' % dbf.prolog.records_count)
for row in dbf:
print(row)
# Read `some.dbf` from zip (ignoring filename case):
with Dbf.open_zip('some.dbf', 'here/myarch.zip', case_sensitive=False) as dbf:
...
CLI
Requires click package (can be installed with: pip install dbf_light[cli]).
$ dbf_light describe myfile.dbf
$ dbf_light show myfile.dbf
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbf_light-0.3.0.tar.gz
(108.5 kB
view hashes)
Built Distribution
dbf_light-0.3.0-py2.py3-none-any.whl
(111.7 kB
view hashes)
Close
Hashes for dbf_light-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 394e1090331336413cd545659ff9fee70ce954c779c712ca1025104a78d5d0f9 |
|
MD5 | e6ed2271c4b21bdd8933565fc4ecd5b2 |
|
BLAKE2b-256 | fe8c28d505ccb25b2fa29c15ca0ddf713de9cecf69bbb429fecbae6fa74ea532 |