Latest Activity

Welcome to my site! I'm a web developer in Lawrence, KS, and I like blogging about Django stuff. Below you can check out what I've been up to lately.

Commit 15329e for IRC Library

Experimenting with a bot that listens for funny links

Building a markov-chain IRC bot with python and Redis

As an IRC bot enthusiast and tinkerer, I would like to describe the most enduring and popular bot I've written, a markov-chain bot. Markov chains can be used to generate realistic text, and so are great fodder for IRC bots. The bot I am writing of has been hanging out in my town's channel for the past year or so and has amassed a pretty awesome corpus from which it generates messages. Here are few of his greatest hits:

Commit b1ea28 for IRC Library

Small fix

Commit 8c4b64 for IRC Library

Unused var

Commit b8891e for IRC Library

Some nitpicky changes to the message generate code to make it a bit more clear

Commit e375b9 for IRC Library

Removing unneeded check for stopword

Updates to peewee, including atomic updates, select related and basic transactions

Over the last two months I've spent a lot of time working on improvements to peewee, a lightweight ORM written in python.

Some of these features are present in Django and were added for better parity, some I found a need for while working on other projects, and others were requested by opening an issue on GitHub or bringing it up on IRC (#peewee on freenode). If you're interested in trying peewee out, it ships with an example app which is described here.

Here's a rundown on what has been added recently:

  • atomic updates
  • select related models
  • basic transaction support

Don't sweat the small stuff - use flask blueprints

For a change, I've been doing all of my new app development using flask, a python web framework built atop the werkzeug WSGI toolkit. Having used django for the last two years it's been fun to do something different, but at the same time stick with python.

In this post I'd like to show a couple of the small projects I've written using flask over the past few weeks.

Redesign of flask-peewee admin

Recently I stumbled across the twitter bootstrap project, which is a set of cross-browser compliant stylesheets and scripts. I liked them so much that I've ported the admin templates to use bootstrap. Here's a little screenshot of the design refresh taken from the example app:

http://media.charlesleifer.com/images/photos/flask-peewee-admin.jpg

I hope this will make the admin easier to work with in the long-run!

Integrating the flask microframework with the peewee ORM

I'd like to write a post about a project I've been working on for the past month or so. I've had a great time working on it and am excited to start putting it to use. The project is called flask-peewee -- it is a set of utilities that bridges the python microframework flask and the lightweight ORM peewee. It is packaged as a flask extension and comes with the following batteries included: