Go to file
Jeffrey Paul 95767ae684 initial 2018-01-28 04:44:03 -06:00
jsondict initial 2018-01-28 04:44:03 -06:00
tests initial 2018-01-28 04:44:03 -06:00
.gitignore initial 2018-01-28 04:44:03 -06:00
Dockerfile initial 2018-01-28 04:44:03 -06:00
LICENSE Initial commit 2018-01-28 04:38:58 -06:00
Makefile initial 2018-01-28 04:44:03 -06:00
Pipfile initial 2018-01-28 04:44:03 -06:00
Pipfile.lock initial 2018-01-28 04:44:03 -06:00
README.markdown initial 2018-01-28 04:44:03 -06:00
circle.yml initial 2018-01-28 04:44:03 -06:00
setup.cfg initial 2018-01-28 04:44:03 -06:00
setup.py initial 2018-01-28 04:44:03 -06:00

README.markdown

jsondict

This is a python package called jsondict that wraps a dict to provide dumb json file backed persistence.

It also returns a default of None for missing keys instead of KeyError, because an exception for an undefined key is annoying, so it's sort of like a defaultdict.

It's not general purpose, and it's not for large amounts of data. It's just sort of like a standard dictionary that you don't need to worry about reading/saving to disk. It's naive and inefficient but perfect for application configs and whatnot. Don't be silly and put more than a few kilobytes in this, the whole file is written out every update and the whole file is re-read and re-parsed every read.

Installation

pip3 install --upgrade pipenv
git clone https://github.com/sneak/jsondict.git
cd jsondict
pipenv install --three .

Other Info

Right now it's only tested on python3. Python2 support is desired.

Author

Jeffrey Paul sneak@sneak.berlin

See Also

License

MIT