Skip to content

Working with lime_data

It's possible to store application specific data in a key-value store in Lime.
This data is stored in a a specific table in the Lime database through the lime_data package.

See a working code example below:

import lime_data

my_prefs = {
    'background': 'lime',
    'theme': 'mojito'

# set data
lime_data.set_data(application, 'prefs', my_prefs, overwrite=True)

# get data
    my_prefs = lime_data.get_data(application, 'prefs')

except NotFoundError:
    logger.error('No prefs found for application')