Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rslinckx on github.
  • I am rslinckx (https://keybase.io/rslinckx) on keybase.
  • I have a public key ASDbGzhIFmQ6yeJSOvWFzFxYLJaf0uGHjKB7DhJhIfVbtgo

To claim this, I am signing this object:

@rslinckx
rslinckx / sadebug.py
Created October 14, 2010 21:27
SQLAlchemy Query debug helper for Flask and Flask-SQLAlchemy
import logging
log = logging.getLogger(__name__)
from werkzeug import Response, Template
import re
import cgi
import time
import uuid
from flask import request, Response, abort
@rslinckx
rslinckx / csrf.py
Created October 14, 2010 21:15
CsrfProtector for Flask applications
import logging
log = logging.getLogger(__name__)
from datetime import timedelta
from flask.helpers import _endpoint_from_view_func
from flask import request, g, abort
import os
import hmac
@rslinckx
rslinckx / principal.py
Created October 14, 2010 20:49
Suggested improvements of Flask-Principal
import logging
log = logging.getLogger(__name__)
from functools import wraps
from flask import session, request, g
from flaskext.principal import Principal as RealPrincipal, identity_loaded, Identity, AnonymousIdentity
__all__ = ['Principal']