Dear Congress...

A note to Congress regarding SOPA and PIPA

Dear Representative Van Hollen, Senator Cardin, and Senator Mikulski:

The “Stop Online Piracy Act” (H.R. 3261) and the “Preventing Real Online Threats to Economic Creativity and Theft of Intellectual Property Act of 2011″ (S.968) are intended to solve a worthy problem, yet the methods recommended by these bills I find to be completely offensive.

I greatly value the protection of intellectual property, yet I place the values of freedom and free speech even higher....

Read more

Custom Django management commands on Heroku

Quick solution to a common Django/Heroku problem.

Running Django management commands is easy on Heroku. For example, to syncdb you simply execute:

$ heroku run python your_app/ syncdb

Easy enough. But you may find that running a custom management command to be a little trickier. You...

Read more

Why Django?

In 5 words or less… Why do you use Django?

I have been a heavy Django developer, architect, and evangelist since about 2006 when Nowell Strite and I first saw a presentation by Adrian and Jacob at OSCON. We brought Django back to PBS where it quickly became our standard development platform.

Read more

Faetus: An FTP interface to Amazon S3 file storage.

An FTP interface to Amazon S3 file storage.


Faetus is an FTP server that translates FTP commands into Amazon S3 API calls providing an FTP interface on top of Amazon S3 storage.



Amazon's S3 API is awesome and there are plenty of excellent libraries that make this very simple. However, sometimes you don't have control over a system,...

Read more


Python library for generating charts for Amazon Web Services based on Amazon CloudWatch data.


pyawschart is a Python library for generating charts for Amazon Web Services based on Amazon CloudWatch data.



Amazon's cloud services provide infrastructure metrics data...

Read more

django-simplegravatar v0.2

Gravatar support for Django projects


A simpler Django template tag to add Gravatar support to your Django projects. This is based on my 2008 post entitled Implementing Gravatar in Django.


To install this app, simply:

  1. pip install...

Read more

Concatenating strings in Django templates

Cheap ass hack to append a string within Django templates.

You might think that joining two strings in a Django template would have been simple and straightforward. In modern versions of Django, we can achieve it using the add filter.

{{ "Mary had a little"|add:" lamb." }}

However, in...

Read more

DCPython: Architecture at PBS

Slides from DCPython meetup on Jun 7, 2011

Edgar and I had the pleasure of presenting at the DCPython meetup last night about how PBS uses Python, Django, Celery, Solr and Amazon Web Services (autoscaling EC2, RDS) to power many of our sites and services. We focused primarily on the COVE (video) and Merlin (content) APIs since those probably have the most interesting...

Read more

Recovering from Amazon cloud outage

What happens when the AWS cloud has a very, very bad day?

Amazon Web Services (AWS) have been integral to the successes of nearly all recent project launches at PBS. All of our core applications are deployed out on AWS EC2 servers and RDS database instances. While we have experienced an occasional component failure, these have been infrequent. When failures have occurred, we have typically been able to leverage the agility...

Read more

mod_wsgi and the HTTP Authorization header

A friendly reminder for myself to RTFD!

If one is building a WSGI application on mod_wsgi and one wants this WSGI application to handle HTTP authentication, it is likely that one will need access to the "Authorization" HTTP header at some point. Had one read the documentation, one would have already understood that mod_wsgi does not pass this header to your WSGI application by default. This is probably a very good thing.

To tell mod_wsgi to pass the Authorization header through to your application, just set the...

Read more

AWS Identity and Access Management (IAM) with Python

Flexible access control to AWS cloud services using Amazon IAM, Python, and boto

With all the AWS services that are now available, our opportunities in the cloud are virtually unlimited. But using any of these services requires access to your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and unfortunately, these keys provides complete access to the kingdom. This may not be a problem for some, but for large enterprises, granular access control is a necessity.

Up until recently, we would have been out...

Read more

pyawschart - v0.2 released

Amazon CloudWatch data visualization

I have just pushed the source code for pyawschart - v0.2 out to GitHub. This project was created a few months back and I have been using it for personal (Proboscis) and professional (PBS) projects since then. I've just decided to open...

Read more