dbfread
dbfread copied to clipboard
Add support for reading from a (non-seekable) file object instead of a filename
This will require internal changes to the library, and perhaps some API changes.
Relevant issues and pull requests:
- feature request: support non-seekable input files #5
- Streaming #14
- Only supports reading a file from the filesystem #25
- Add support to read dbf file from zip-archive #39
- https://github.com/olemb/dbfread/issues/37
I suspect the best solution to handle all of these cases is to break most of the code into functions that can be composed into different APIs. For example, there could be a function that reads the headers from a file object, an d a generator that reads records from a file object and we could write a new backwards compatible DBF class or another leaner API on top of these.
These smaller function would also be useful when writing debugging tools.
Take a look at our implementation here if it's useful: https://github.com/catalyst-cooperative/dbfread