Skip to main content


Project description

SQLAlchemy-backed username/password authentication for the Pyramid web framework.

What You Get

  • Versioned schema with stucco_evolution
  • SQLAlchemy-mapped User, Group, and Settings classes
  • BCRYPT password encryption with cryptacular
  • Pyramid views to login and logout
  • Traversal, not routes
  • Jinja2 templates for the views
  • Uni-Form CSS themed login form
  • YUI 3 CSS in the base template
  • 99% test coverage

What You Don’t Get

  • Any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.


It’s easy enough to add the stucco_auth views to your application by calling:

from pyramid.config import Configurator
config = Configurator(...)

Unfortunately, stucco_auth requires many things from a host Pyramid application before it will work properly:

  • A configured authentication and authorization policy. Login and logout views don’t make sense otherwise.
  • A transaction-managed SQLAlchemy session made available as request.db
  • stucco_auth’s schema instantiated into that database
  • request.session for flash messages
  • Jinja2 templating
  • A stucco_auth.interfaces.IAuthRoot instance in the resource tree. login/ and logout/ are resolved relative to this object.

The demo application, stucco_auth.main(), provides one example of how to set this up.

If you have any questions, please ask DanielHolth in IRC or on one of the Pylons mailing lists.


  • Generate random password in a Python 3 compatible way.


  • Lengthen username, email fields


  • update AnonymousUser class (has no table) to be __abstract__ for compatibility with newer SQLAlchemy.


  • don’t specify paster_plugins. need to re-evaluate template project.


  • upgrade to a normal version numbering scheme
  • generalize ‘persistent random secret’ code


  • fix to include the .jinja2 templates


  • update for stucco_evolution >= 0.33


  • 99% test coverage


  • Remove everything except the most basic user/groups/login functionality


  • Initial version

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stucco-auth, version 0.7.1
Filename, size File type Python version Upload date Hashes
Filename, size stucco_auth-0.7.1-py3-none-any.whl (33.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size stucco_auth-0.7.1.tar.gz (23.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page