PyMOTW: hmac

The HMAC algorithm can be used to verify the integrity of information passed between applications or stored in a potentially vulnerable location. The basic idea is to generate a cryptographic hash of the actual data combined with a shared secret key. The resulting hash can then be used to check the transmitted or stored message to determine a level of trust, without transmitting the secret key. Read more at pymotw.com: hmac

Book Review: RESTful Web Services

As part of the Atlanta Python Users’ Group Book Club, I received a copy of RESTful Web Services written by Leonard Richardson and Sam Ruby, and published by O’Reilly Media. When we started the book club, this was the first book I suggested we read. I had previously studied some material on various blogs discussing REST, but I wanted a clear description and more specific examples. The book provided both, and I highly recommend reading it before planning your next web development project.

django-links

I spent some time yesterday afternoon working on my personal site. I wanted a way to add “related links” for my projects, without hand-editing individual lists in HTML. That’s boring, after all. Surprisingly, I didn’t find an existing django app that did anything like that, and had to build one myself. My requirements were pretty simple: My site uses codehosting to host project home pages, including file release management, and RSS feeds for updates.

PyMOTW: unittest

Python’s unittest module, sometimes referred to as PyUnit, is based on the XUnit framework design by Kent Beck and Erich Gamma. The same pattern is repeated in many other languages, including C, perl, Java, and Smalltalk. The framework implemented by unittest supports fixtures, test suites, and a test runner to enable automated testing for your code. Read more at pymotw.com: unittest

PyMOTW: optparse

The optparse module is a modern alternative for command line option parsing that offers several features not available in getopt, including type conversion, option callbacks, and automatic help generation. There are many more features for to optparse than can be covered here, but hopefully this introduction will get you started if you are writing a command line program soon. Read more at pymotw.com: optparse

feedcache 1.1

What’s new? There is a new release of feedcache available tonight, based on a patch from Thomas Perl. The update includes Unicode support for URLs, a “force” flag to always download data, and an “offline” mode flag to never download data. Thanks, Thomas!

PyMOTW: csv

The csv module is very useful for working with data exported from spreadsheets and databases into text files. There is no well-defined standard, so the csv module uses “dialects” to support parsing using different parameters. Along with a generic reader and writer, the module includes a dialect for working with Microsoft Excel. Read more at pymotw.com: csv

Python Developer Networking

Jesse Noller is leading a campaign to have Python developers form a network via LinkedIn.com. He talks about it over on his blog, so check it out for the details. According to Doug Napoleone‘s comment on Jesse’s post, there is a more formal effort to set up a PyCon08 group and tie it in with the web site for the convention. I didn’t realize that LinkedIn supported groups other than “employers”.

PyMOTW on O’Reilly ONLamp

I’m pleased to bring the Python Module of the Week series to the O’Reilly ONLamp site. The main feed and home page are not moving, and all posts will continue to be posted here. Updated: The announcement post is here.

CommandLineApp

Back when Python 1.5.4 was hot and new, I wrote a class to serve as a basis for the many command line programs I was working on for myself and my employer. This was long before the Option Parsing Wars that resulted in the addition of optparse to the standard library. If optparse had been around, I probably wouldn’t have written CommandLineApp, but since all I had to work with at the time was getopt, and it operated at such a low level, I hacked together a helper class.