Welcome to my site! I'm a web developer in Lawrence, KS, and I like blogging about Python and programming in general. I'm also an avid motorcycle rider. Below you can check out what I've been up to lately.


Writing (tags)

  • Rewriting Huey for a better API May 15, 2013 11:50

    For a while I've been itching to rewrite Huey, and just last week released 0.4 which is an almost total rewrite. I initially started Huey for performing tasks like checking comments for spam, sending emails, generating thumbnails, and basically anything that would slow down the pagespeed on my sites. This is still what I see as the primary use-case for huey -- performing small tasks outside the request/response cycle and running jobs on a schedule (I have a site that scrapes the county sheriff's site and keeps a log of arrests in my town). The goal for the rewrite was not to change the purpose of Huey, rather it was to change the API.

  • Structuring flask apps, a how-to for those coming from Django April 27, 2013 13:21

    The other day a friend of mine was trying out flask-peewee and he had some questions about the best way to structure his app to avoid triggering circular imports. For someone new to flask, this can be a bit of a puzzler, especially if you're coming from django which automatically imports your modules. In this post I'll walk through how I like to structure my flask apps to avoid circular imports. In my examples I'll be showing how to use "flask-peewee", but the same technique should be applicable for other flask plugins.

    I'll walk through the modules I commonly use in my apps, then show how to tie them all together and provide a single entrypoint into your app.

  • "wallfix", using python to set my wallpaper April 22, 2013 09:54

    I had fun writing about my "cd" helper, so I thought I'd share another productivity helper I wrote for setting my wallpaper. It's a little silly, but I insist on my wallpaper being used for my lockscreen and my login window as well -- that way the entire time I'm on my computer the background is "seamless". Before I wrote this script it used to take me probably 3 or 4 minutes to change wallpapers!

  • More posts...

Coding

  • ce74c3 to peewee Charles Leifer on May 17, 2013 18:07

    Beefing up the dict methods

  • 104993 to flask-peewee Charles Leifer on May 16, 2013 07:23

    Showing example of specifying branding.

  • 87643f to flask-peewee Charles Leifer on May 16, 2013 07:22

    Adding a block for overriding the branding if you do not want to display it at all, and adding title blocks to the templates that were missing them.

  • e38bfb to huey Charles Leifer on May 15, 2013 06:32

    Note on autodiscovery, fixes #25

  • cbedd2 to project-euler Charles Leifer on May 14, 2013 20:03

    Problem 3

  • db1004 to project-euler Charles Leifer on May 14, 2013 19:54

    Solving p02

  • e91037 to project-euler Charles Leifer on May 14, 2013 19:50

    Lua!

  • 41a778 to flask-peewee Charles Leifer on May 14, 2013 11:20

    Make it easier to control the branding text. Fixes #71

  • 95b5f6 to peewee Charles Leifer on May 12, 2013 08:57

    Add params from order by clause to param list fixes #192

  • ed0813 to huey Charles Leifer on May 09, 2013 07:31

    Fixers