Drupy: Porting the Drupal CMS to Python

Posted on August 3, 2008
Filed Under Software |

druplicon Drupy: Porting the Drupal CMS to Python

Had I not taken a look at the project page, I probably would have thought that anyone pointing this project out was either crazy or engaged in a bout of wishful thinking, or both! Alas, it is quite real though, and stirs up all kinds of wobbly thoughts in me on the subject:

Drupy is a port (it is a port, and not a fork as some have incorrectly suggested.) of the Drupal content management system to the Python language.

For one, you cannot escape the growth, hype, and actual performance of Drupal in the open source world. Drupal is a veritable content management juggernaut, and one which I both heartily recommend, and support via the occasional bug report, helping in IRC, and via my membership in the Drupal Association.

On the other hand, while being an undisputedly ubiquitus web programming language, and at the risk of turning this into a PHP vs Python post, I think PHP fails quite famously on numerous fronts in comparison to Python, the least of these fronts being code correctness and security.

Not that I claim to be a programmer, but I am of the opinion that yes, the PHP language does encourage sloppy programming by having a “schizophrenic tableau of function names”,1 allowing mixing of presentation and logic, and other similar fouls, while Python eschews doing things in a more sensible and simpler way, which often results in a more efficient application.

There are only two kinds of languages: the ones people complain about and the ones nobody uses.

—Bjarne Stroustrup

I would also argue that due to the extremely low barrier of entry for PHP, there are probably more holey security nightmares on the web coded in PHP than all the Python code in the world combined, and really what about scalability and such? There’s one internet behemoth out there that counts only four allowable languages in its operation, and PHP is not one of them. (hint: Python is one of them)

Does this mean PHP is useless, and should be avoided for anything serious? Is PHP just a “language to teach to your girlfriend about programming”, as I’d heard it explained several years ago? Do I dislike PHP, and wish Drupal had been written in Python from the get-go?

No.

There are many projects, like Drupal, which promote a sane2 and strict coding stlye in PHP, and audit their code heavily for correctness and security vulnerabilities.

There’s something to be said also for the deployment of a PHP web application, and it’s been said by folks more well-versed than I in the world of web applications. In it’s Apache module form, PHP is dead-simple to get going, and this is undoubtedly a major factor in its success (especially combined with the general ease of learning the language itself).

To get back on track however, I must say that while I am not surprised a group of enterprising hackers out there recognized the greatness that is Drupal, and felt only the language was holding it back, I am quite amazed they’ve taken action! This project could change a lot in my world, but I’m certainly on the fence as to whether I should dive in…

Drupy doesn’t appear to be a hugely popular project at present, but the developers have come a long way with their goals of porting Drupal to Python. These are the statistics from Drupy’s project page:

All this work, seemingly out of nowhere, and the project has but one admin on it’s SourceForge page, a certain Brendon Crawford (message144). Quite impressive. They’ve an IRC channel (#drupy) on freenode.net, too- Perhaps I’ll drop in to and lurk a spell to learn more about this intriguing project.

If you’re as curious about Drupy as I, check out the Drupy project’s site- there is also some talk, possibly from the Drupal perspective on the project over at Boris Mann’s website as well. (Mann is a Drupal Association General Assembly member).

I’ll be keeping an eye on this project as I continue to be enchanted by Python while still promoting, recommending, and supporting the quality PHP solutions of the web world, like Drupal.

  1. To be fair, namespaces have been introduced in PHP 5.3, which is not GA yet []
  2. If not a bit too anal- when it comes to disputing whether or not the description of a function should carry a period, you’ve certainly crossed a threshold of grammarian zealotry that even I cannot fathom! []
Tags: ,

Comments

2 Responses to “Drupy: Porting the Drupal CMS to Python”

  1. Brendon Crawford on August 13th, 2008 4:19 am

    Thanks for the write-up. Porting Drupal to Drupy is certainly not an easy task, especially for one person, but it is getting there one step at a time. The user module has also just been ported to Drupy.

  2. Brian Shumate on August 13th, 2008 8:24 am

    Heya Brendon; Thank you, for stopping by! I am quite interested in your project, and would certainly like to do a test drive when it is closer to being a beta-ish solution.

    I’d also like to discuss the project with you sometime- I’ll send you an email with more details.

Leave a Reply