Category archives: Python

Programming in Python.

RSS feed of Python

Building Debian Packages with Python (UPDS Part I.V)

I use DPKGs for all my deployments, and have tried a number of tools to build them. None have been perfect though, so what’s the best solution? Build my own, of course! TL;DR: I wrote a native Python (OS-independent) package to build Debian Packages: deb‑constrictor.

Alternatives

I’ve tried a few ways ...

Continue reading

The Ultimate Python Deployment System I

I don’t release stuff as often as I should. Because it’s a pain to configure new applications and get them installed where you want them. I want a tool that:

  • Will automatically install dependencies
  • Handles version incrementing without being tied to source control (i.e. the current version is stored in a file ...

Continue reading

Python Is Slow, Make It Faster With C

This is a companion blog post to my talk at Kiwi Pycon 2014 (surprisingly, the title of my talk is also Python is slow, make it faster with C). The point of the talk was not so much “Here is a Python project and these are the changes I made to turn it into C ...

Continue reading

Better Unit Tests with Nose

Unit testing! We all love it, and we all do it, right? Of course we do. But wouldn't it be much more satisfying if we could write tests more easily, quickly see what code still needs testing, and keep a record of these tests? Using nose to run your Python tests helps with all ...

Continue reading

Faster SQLAlchemy with Memcached

SQLAlchemy provides a great Pythonic way of interacting with SQL, however it does introduce some overheads which can slow down your application, especially if you're used to the speed of raw SQL. Read on to see how I was able to combine SQLAlchemy and Memcached to retrieve up-to-date results quickly.

Background

Very shortly I ...

Continue reading