A simple key-value store implemented directly on the file system.
The fskv.py file provides a very basic framework to interacting with files on the file system using a limited SQL dialect. Supported operations:
insert or update into data (key, value) values (7, 'value')
- Writes a file nameddata/7
containting the text "value".select value from data where key=7
- Gets the contents of the file nameddata/7
.delete from data where key=7
- Removes the file nameddata/7
.
The provided Python file fskv.py
is missing the implementation for three key functions. Implement these functions such that all supplied doctests pass.
Doctests may be run either using:
make
or by directly calling:
python3 -m doctest fskv.py