python: how to have a dictionary which can be accessed from all the app
This is impossible (without an external service). DBs are made for this to store data longer than one request. What you could do is to safe the dict "in" the users session, but I don't recommend that. Unless you have millions of entries every DB is fast enough even sqlite.
I am new to Python and have been studying its fundementals for 3 months now, learning types, functions and algorithms. Now I started practiciging web app development with GAE framework.
Goal: have a very large dictionary, which can be accessed from all .py files throughout the web app without having it stored more than once or re-created each time when someone visits a URL of the app.
I want to render a simple DB table to a dictionary, with hopes of speed gain as it will be in memory.
Also I am planing on creating an in memory DAWG - TRIE
I don't want this dictionary to be created each time a page is called, I want it to be stored in memory once, kept there and used and accessed by all sessions and if possible modified too.
How can I achieve this? Like a simple in memory DB but actually a Python dictionary?
Thank you.