Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

put CAPTCHAs on forms

Project Description

CAPTCHAmiddleware is a WSGI middleware python packages for putting CAPTCHAs on forms for unauthorized users (those that haven’t logged in yet). If you aren’t authorized – in python terms, if remote_user is not set on the request – then CAPTCHAs and a hidden key will be added to forms with method=POST. You will be required to correctly solve the CAPTCHA in order to submit the POST request. Otherwise, the CAPTCHAmiddleware will stop your request and redirect you back to the form.

What are CAPTCHAs? -or- I hate those things

CAPTCHAs are admittedly imperfect ways of telling humans and computers apart. Presumedly if you are already identified (logged in), then the computer is satisfied that you are you. But what if you want to make an anonymous comment on someone’s blog post? In a perfect world, there would be no CAPTCHAs. In the real world, there is SPAM. So if I want to protect my blog from SPAM-bots, I need to do something. Again, CAPTCHAs aren’t perfect, but they’re at least something.

Why SkimpyGimpy?

I used SkimpyGimpy because it is free, open souce, and has an easy to use API. People complain that the CAPTCHAs are hard to read. I’m sorry about that. If you really want to help, I’m sure the SkimpyGimpy developers would be more than glad for a hand.

Why not reCAPTCHA?

reCAPTCHA is annoying because it uses an API key and is not open source. I have no idea why either of those things are true. If someone wanted to help include reCAPTCHA support in this package, I’d be happy to help. But because my opposition to closed source software (yes, even if they are web services) and API keys, its not a priority for me.

Why do this with middleware instead of in an app?

This is a long debate and the subject of many blog posts. In short, both approaches are valid. If you want to integrated with application logic, you shouldn’t use middleware for something like this. If you just want this functionality and don’t care about tight integration, then this approach might work for you.

Why does CAPTCHAmiddleware look half done?

Because it is. This is very much a work in progress. Its target audience is clearly developers who want to get their hands dirty. So, as per the usual disclaimer, sorry for the mess, am working on it.

Release History

Release History

This version
History Node

0.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
CAPTCHAmiddleware-0.2.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Feb 26, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting