Metadata-Version: 2.4
Name: pydbisam
Version: 1.2.1
Summary: Read DBISAM database tables.
Author-email: Aaron Linville <aaron@linville.org>
License-Expression: ISC
Project-URL: Homepage, https://github.com/linville/pydbisam/
Project-URL: Changelog, https://github.com/linville/pydbisam/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/linville/pydbisam/issues
Keywords: dbisam
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: black==25.1.*; extra == "dev"
Requires-Dist: build==1.2.*; extra == "dev"
Requires-Dist: ruff==0.11.*; extra == "dev"
Requires-Dist: twine==6.1.*; extra == "dev"
Dynamic: license-file

PyDBISAM
========

PyDBISAM is a pure Python module to read and export data from DBISAM tables (from their `.dat` files). The scope of PyDBISAM is _not_ to provide a full database framework but merely to provide the ability to read the table structure and the raw table data.

DBISAM is an on-disk database with one file per table. The file format is proprietary. The basic structure is [documented here](NOTES.md).


CLI Usage
---------
PyDBISAM includes a simple CLI that can be used to dump the table structure or export the data to various formats (e.g.: CSV).

```shell
# pydbisam --dump-structure path/to/file.dat

# pydbisam --dump-csv path/to/file.dat
```


Code Usage
----------
The PyDBISAM class can be used for read-only access to the tables.
```python
from pydbisam import PyDBISAM

with PyDBISAM("path/to/file.dat") as db:
	print(", ".join(db.fields()))
	for row in db.rows():
		print(", ".join(map(str, row)))
```


Similar Projects
----------------

- [DBISAM-to-JSON](https://github.com/KrijnL/DBISAM-to-JSON)
  - Python 2/3 script to convert DBISAM to JSON (limited support for various column types).
