Category Archives: Python

Making Server-Side MongoDB Functions Less Awkward

I’ve recently switched my project at work to use MongoDB for the user database and a few other datasets. Currently I don’t use many JavaScript functions, but when I do I like to store them on the server so that … Continue reading

Posted in Open Source, Python, Technology | Tagged , , | 7 Comments

lxml vs. ElementTree

While lxml has some excellent benchmarks about the speed of lxml.etree vs. ElementTree, I wanted to run some tests that were as close as possible to my own use case (fairly simple multi-megabyte XML files). Here are the results of … Continue reading

Posted in Python, Technology | Tagged , , , | 7 Comments

Python Packaging Talk

I gave a talk at PDX Python last night on Python Packaging. It’s just an overview and introduction completely lacking in any practical examples. Python Packaging slides (ODP) Python Packaging slides (PDF) Let me know if the ODP source is … Continue reading

Posted in Open Source, Python, Technology | Tagged , , , , , , , | Leave a comment

Switched tc-rest to webob

Small update on my toy tc-rest project: I switched to using WebOb for creating HTTP Request and Response objects. Cleaned up the code a bit, but a real dispatcher is what’s needed to really remove the cruft. I’m anxious to … Continue reading

Posted in Open Source, Python, Technology | Tagged , , , , | 2 Comments

TokyoCabinet + fapws3 = tc-rest

Have you ever wondered how hard it would be to tack a RESTful HTTP interface on top of a fast key/value database like TokyoCabinet? Probably not, but I did: tc-rest.tar.gz Components: TokyoCabinet – my favorite persistent key/value database pytc – … Continue reading

Posted in Open Source, Python, Technology | Tagged , , , | Leave a comment

I Love Python: ZipFile Edition

For a client web project I needed to create a zip file containing a number of generated XML files. This isn’t something I need to do very often, so I briefly considered just writing the XML files to disk and … Continue reading

Posted in Open Source, Python, Technology | Tagged , | 2 Comments