Google App Engine - Is os.environ reset between requests?

Posted by Ian Charnas on Stack Overflow See other posts from Stack Overflow or by Ian Charnas
Published on 2010-02-14T17:48:09Z Indexed on 2010/04/24 16:03 UTC
Read the original article Hit count: 182

Filed under:
|

Hello I can't think of a way to test this and was hoping someone here knew the answer... I'm storing some request-specific data in os.environ, and was wondering if that data was going to leak to other requests. Does anyone know?

Yes I realize that it's normal to use request.environ for this, and usually I do, but I want to store the currently authorized user ID (I'm using custom auth, not GAE auth) inside os.environ so that the models know the currently logged in user (remember, they don't have access to request.environ) without me having to pass the request object to just about every single model method.

any help would be greatly appreciated Ian

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine