Skip to content

joncombe/django-tinystore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

from tinystore.models import TinyStore

TinyStore.get('omg')  # None
TinyStore.exists('omg')  # False
TinyStore.keys()  # []

TinyStore.set('omg', {'a': 1})
TinyStore.get('omg')  # {'a': 1}
TinyStore.exists('omg')  # True
TinyStore.keys()  # ['omg']

TinyStore.remove('omg')
TinyStore.keys()  # []
# or
TinyStore.remove_all()
TinyStore.keys()  # []

Optionally, set defaults in settings.py, e.g.

TINY_STORE = {
    'omg: {'test': 42},
    'lol: {'key': 'value'},
}

About

A tiny, persistent JSON store for Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages