PyMongo 1.7 and MasterSlaveConnection – TypeError breakage

MasterSlaveConnection: Works in Pymongo 1.6 In my previous article Python, MongoDB and Pylons – Connection handles and all that lark I described the code and configuration we use at Snaptic for working with Pylons and MongoDB. We use the MasterSlaveConnection class to automatically handle read/write splitting, because we expect to be running a single master/multiple [...]

Python, MongoDB and Pylons – Connection handles and all that lark

I’ve been doing a bunch of hacking with Pylons and MongoDB recently for some backend stuff at Snaptic. Right now we are using Paster as the webserver and the Pymongo driver. This all works fine and is pretty straightforward to set up – but there are a couple of subtleties. MongoDB vs SQLAlchemy If you’ve [...]

Pylons tip #5 – Streaming static files

Pylons makes it super easy to return data to a client. You just return a string from your controller method! class HelloController(BaseController):   def index(self): return ‘Hello World!’ Very nice. However, what if you want to serve up a potentially quite large file to the client? Sure, you could read the file into memory, and [...]

Py Web SF: The San Francisco Python & Web Technology Meet-up

Last month I started Py Web SF, the San Francisco Python & Web Technology meet-up. The idea is 1-2 conversation-style presentations of about 30 minutes with a group of 10-20 people. My hope is to have a more intimate group than the very good Bay Piggies (which I highly recommend). With a small group, it [...]

Turbo Gears 2.0 Released

I read today that Turbo Gears 2.0 has been released – at long last! I used Turbo Gears 1 briefly in 2007 for a small project then switched to Pylons. Pylons is pretty neat because its really a framework for building a framework. You can pick and choose WSGI middleware and slot it all together [...]