Remembering why I love Python

Late last night I rediscovered why I love Python.

I’m designed some scripts that I want to use to help me manage all my blogs and keep them fresh with content. I designed a basic solution which involves getting and mashing information into a database followed by re-purposing that content for my sites based on a few inputs.

The first version of the script will be very basic. Parse an RSS feed, store it in a database, then later read from the database, apply some text manipulation and upload the content to a WordPress blog.

A quick Google search and I found two Kick Ass Python libraries, and one simply amazing fact about the built in libraries.

There’s an RSS feed parser called feedparser which works beautifully. One line of code gets the rss from the web and puts it into an easily understandable structure.

Then there’s another awesome library for wordpress that gives full control from Python for posting to wordpress blogs.

Then, perhaps the best news, is that Python includes sqlite3 out of the box. That makes the whole database and permanent storage problem trivial. It simplifies a future transition to something like MySQL or Amazon SimpleDB.

These three things togeher turns what could be a very complex application, into a trivial 50 line script.