Questions tagged [gae-sessions]

gae-session is a fast, lightweight sessions middleware for Google App Engine (secure cookies, memcache, or datastore). It is a sessions library for the Python runtime on Google App Engine for ALL session sizes. It is extremely fast, lightweight (one file), and easy to use.

8 questions
4
votes
1 answer

Using pytest with gaesessions session middleware in appengine

When I run py.test --with-gae, I get the following error (I have pytest_gae plugin installed): def get_current_session(): """Returns the session associated with the current request.""" > return _tls.current_session E …
Albert
  • 3,611
  • 3
  • 28
  • 52
3
votes
1 answer

gae-sessions 'thread._local' object has no attribute 'current_session'

I'm trying to get gae-sessions working, but am having an issue. I've logged inside of appengine_config.py and inside of webapp_add_wsgi_middleware and it is being called. I've logged inside the libs __init__.py and it's running __init__, __call__…
Joren
  • 9,623
  • 19
  • 63
  • 104
3
votes
1 answer

AppEngine/Python NDB key order

I have an interesting problem that only showed up after upgrading my code to use NDB. I am using gae-sessions, which encodes session expiry time into the key of each Session that is stored in the database. For example a key would have the following…
3
votes
1 answer

errors with gae-sessions and nose

I'm running into a few problems with adding gae-sessions to a relatively mature GAE app. I followed the readme carefully and also looked at the demo. First, just adding the gaesesions directory to my app causes the following error when running…
new name
  • 15,861
  • 19
  • 68
  • 114
2
votes
1 answer

How to get current session with only the SID?

How can I retrieve a session using only its session identifier (SID)? I'm using gae-sessions. Update for response @David Underhill: I've done what you suggested, but in debug mode I got this: Session: SID=None {} | but it has db_key populated with a…
Totty.js
  • 15,563
  • 31
  • 103
  • 175
2
votes
1 answer

App Engine / Django - Interleaving multiple requests interfering in GAE-Sessions

I am running a python application on the App Engine using Django. Additionally, I am using a session-management library called gae-sessions. If threadsafe is set to "no", there is no problem, but when threadsafe is set to "yes", I occasionally see a…
Alexander Marquardt
  • 1,539
  • 15
  • 30
0
votes
1 answer

app engine update all sessions for user

In my gae application, a user can do an action (buy something). I need that information stored persistently and available imediately on all requests from all sessions of this user on multiple devices/browsers. I'm using webapp2_extras sessions. The…
user3526468
  • 334
  • 5
  • 14
0
votes
0 answers

gaesessions cant find 'current_session' attribute

I'm using gaesessions. When I try to check the current sessions by doing get_current_session() I get the following error: File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\_webapp25.py", line 716, in __call__ …
rogcg
  • 10,451
  • 20
  • 91
  • 133