The scenario: I have a Networkx network with around 120.000 edges which I need to query each time a user requests a page or clicks something on the page, so a lot of calls.
I could load and parse the network each call, but that would be a waste of time as that would take around 4 seconds each time (excluding the querying).
I was hoping I could store this network object (which is static) somewhere globally and just query it when needed, but I can't find an easy way to do so.  Putting all the edges in a DB is not an option as it doesn't eliminate the time needed for parsing.
You could simply install it as a global variable. Call the function that loads it in a module-level context and import that module when you need it (or use a singleton pattern that loads it on first access, but it's basically the same thing).
You should never use a global variable in a webapp if you expect to alter the contents on the fly, but for static content there's nothing wrong with them.
Just be aware that if you put the import inside a function, then that import will run for the first time when that function is run, which means that the first time someone accesses a specific server after reboot they'll have to wait for the data to load.  If you instead put the import in a module-level context so that it's loaded on app start, then your app will take four seconds (or whatever) longer to start in the first place.  You'll have to pick one of those two performance hits -- the latter is probably kinder to users.
Django large variable storage