gratipay.utils.get_participant(state, restrict=True, resolve_unclaimed=True)[source]

Given a Request, raise Response or return Participant.

If restrict is True then we’ll restrict access to owners and admins.


Given a unicode, return a unicode that’s safe for transport across a querystring.

gratipay.utils.decode_from_querystring(s, **kw)[source]

Given a unicode computed by encode_for_querystring, return the inverse.

We raise Response(400) if the input value can’t be decoded (i.e., it’s not ASCII, not padded properly, or not decodable as UTF-8 once Base64-decoded).


Prints sql and params to stdout. Works globaly so watch for threaded use.


For when you want to inject an object into a <script> tag.