This is all overkill. I dont see why you need fancy 3rd party frameworks for a non http/web app. You wouldnt store the users login info locally. You would perform the auth against postgres or ldap or any type of server that has the users. If the user passes the auth you can use a QSettings instance in pyqt to store a persistent arbitrary amount of preferences for the user. At that point its up to you if you want to store simply a session key that can be used to check out the real prefs from postgres. And maybe that session key has a TTL so it can expire. Or not. That would be the closest to an http session i think. All these other frameworks are for http requests. But with your pyqt app you have a database driver talking live to postgres. There are no requests. QSettings creates appropriate property files for different operating systems in the right user location. I think it will solve your issue. The steps in a nutshell are: User loads pyqt app Load the QSettings object and check for a session key If session key, is it still valid in db? If so, get prefs from db If not, ask for user and password and validate on db. Generate a new session key and store in QSettings and prefs on db
On Dec 29, 2011, at 6:10 AM, Pierre A <[email protected]> wrote: > I don't know exactly what you are trying to achieve, but when I see session > and python in the same sentence, beaker comes to mind. > I've only used it with wsgi apps, but the doc says that it works with stand > alone applications. > http://beaker.readthedocs.org/en/latest/index.html > > For authentication and authorization, you could have a look at repoze.who ( > http://docs.repoze.org/who/2.0/ ), but it's aimed for wsgi applications. > Perhaps you could hack it: > http://docs.repoze.org/who/2.0/use_cases.html#api-only-use-cases > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
