Easiest way to insert python "globals" (non-models) into current session/document (e.g., for multiple users on the same server)

Unfortunately, it appears that those python globals in the app file are not independent for multiple users accessing the same bokeh server

Were these “globals” in another module? Then, yes, Python’s own module-caching will ensure there is only one copy of that module, and hence one instance of anything in that module.

I saw some advice that basically said “the document is the thing each user gets separately, so just attach any needed session variables to the document.” This makes sense to me in principle, but when I look at how things are added to the root of the curdoc, it appears it is looking specifically for Model objects.

The advice is not to add it as a “root” but merely attach any ad-hoc attributes that are convenient for your case:

curdoc().my_stuff = 10

That said, the terminology “globals” here seems very ambiguous. Python itself has no globals, the closest thing are “module scope” variables, and then even so, I would expect a “global” to be accessible, well… globally. You see to want the opposite of that. It’s not really clear what exactly you are trying to achieve. It might help if you can back up and explain your requirements more fundamentally, without pre-supposing details about an implementation.