(I have nothing to do with it but) Zope 3 has a nicely abstracted thread globals approach, actually. I think I remember hearing it was the same sort of key approach. It's in a C extension, and has some docs and unit tests. Check in http://svn.zope.org/Zope3/trunk/src/zope/thread/ if you want to browse around. Pretty much everything in 'zope' that's not 'zope.app' is intended to be used outside of the zope app server. Dependencies are specified in DEPENDENCIES.cfg in each package--I don't think the thread code has any.