sachin1152207/pyJsonStorage ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python package that works like a simple database but stores everything in a JSON file.
I want to be able to create a new storage file if it does not exist, define a table with a schema, add rows, read one row or all rows, update a row, and delete one or many rows. It should also support saving changes back to disk, and it should handle bad input cleanly so data does not get messed up.
Please include a simple example showing how someone would use it with a file path, create a table, insert some sample records, fetch data, update a record, delete records, and save everything. If helpful, use the current docs online to match the usual way people expect a package like this to behave.
Are you gonna build this?
make sure you review the code using coderabbit