Why Nostr? What is Njump?
2024-09-10 13:42:29

🥥Matthew Martin🥥☑ on Nostr: Anyone understand #ContextVars in #python ? I'm trying to add support to #svcs so ...

Anyone understand #ContextVars in #python ? I'm trying to add support to #svcs so that when there isn't a web framework with a context to glom onto, that you can use the thread/thread.local/ContextVars and an alternative to the Application/Request that a web framework would provide.

So far, I can only get it to "work" if the ContextVars are globals.

https://gist.github.com/matthewdeanmartin/4a4aaa799df7a454b7ddb7230a78a64f#file-thread-py-L21
Author Public Key
npub1d3u7t3fcdmsuhedcqvpugrud0qvrrmmckc7wwmrjds7qk3lkyt0qesr8n4