def foo():
    options = {'DATABASES': {'default': {'ENGINE':
        'django.db.backends.sqlite3'}}}
for k, v in list(options.items()):
    exec ('%s = v' % k)
print(DATABASES)
foo()
How can I load all keys from a dict as local variables, a better aproach?