patx / pickledb

pickleDB is an open source key-value store using Python's json module.
https://patx.github.io/pickledb
BSD 3-Clause "New" or "Revised" License
925 stars 125 forks source link

Add file deletion option to deldb() #89

Open transiscodev opened 1 year ago

transiscodev commented 1 year ago

Additions

___location__ : str a string in the PickleDB class that holds the database path as entered

Modified

deldb(self, andfile = False) the deletion function now includes an option to delete the database file.

This implementation is non breaking. Existing calls to deldb() will not delete the file unless deldb(True) is called (which is invalid in older implementations, so there isn't a risk to production code.)

Creature comforts

Additional unit tests for new functionality, fixed docstring typos, updated relevant docstrings and HTML documentation. pytest tests.py reports 100% ✅