amazon-textract-textractor
amazon-textract-textractor copied to clipboard
TGeoFinder should have a method to reset the in memory sqlite database
Hi @Belval
- I find out that every time when you create the TGeoFinder class from the JSON data, you actually generate a uuid for this object and insert lot of data into the sqlite lite database. I suggest adding a optional parameter when you create TGeoFinder object, allow user to explicitly pass unique identifier as a key, so user can explicitly delete all records related to this object in database in case the original object is already garbage collected.
- consider adding an explicit method instead of doing
del t_geo_finderobject for more Pythonic API.
Wonderful library!
Hi @MacHu-GWU ,
Trying to understand the exact problem.
Being able to pass in the UUID could make sense, but you got the generated UUID in self.textract_doc_uuid in the TGeoFinder and can use that to delete everything through the delete method in OCRDB, which is also used to delete the OCRDB when the TGeoFinder object is garbage collected.
Maybe you can detail the lifecycle or give a sample where the problem occurs.
Glad you like the lib :-)