Tagged "python"

Prototyping with staticjinja

I’ve started building a website for a friend of mine, who works for an organisation called Talitha. I wanted to get something up and running quickly (since I figured a website was better than no website), so I just started playing with Bootstrap. From there, I had an idea of what I wanted the site to look like, and all was well. I threw up a single page site that introduced the organisation a little bit.

Easy testing with Travis and tox

I love tox - it’s a great tool for checking that your Python packages are installable, and that you support all the various configurations of Python versions and other package versions that you think you do. It’s also quite a neat way of checking your documentation builds properly, and that your code remains PEP 8 compliant1. I also love Travis, since it helps me accomplish much the same thing as tox, but does so in an automated way, with every push.

Using a local cache for pip packages

I do a lot of development without an internet connection1, so being able to install packages into a virtual environment without a connection to PyPI is pretty useful. I’ve got a couple of aliases in my .bashrc which help with this2: alias pipcache='pip install --download ${HOME}/.pip-packages' alias pipinstall='pip install --no-index --find-links=file://${HOME}/.pip-packages/' The first downloads the packages to my local cache, the second installs them from the cache. Usage is probably fairly obvious: