All articles tagged Development

Thumbnail image for Distributed Locking in Django

Distributed Locking in Django

As you start scaling an application out horizontally (adding more servers/instances), you may run into a problem that requires distributed locking. That’s a fancy term, but the concept is simple. Sometimes you have to be sure that when a block …
Thumbnail image for Goodconf: A Python Configuration Library

Goodconf: A Python Configuration Library

I’ve been working quite a bit lately on streamlining Lincoln Loop’s standard deployment systems. One thorn we’ve always had is how to handle application configuration. In the past, we would have our configuration management system write the configuration out to …
Thumbnail image for Python Dependency Locking with pip-tools

Python Dependency Locking with pip-tools

Two of the biggest benefits pipenv and poetry are dependency locking and hash checking. Dependency locking means you can specify the direct dependencies your code requires, for example, celery==4.4.* and the tooling will lock, not only celery to a specific …
Thumbnail image for Dissecting a Python Zipapp Built with Shiv

Dissecting a Python Zipapp Built with Shiv

In a previous post, we showed how to use shiv to bundle a Django project into a single file for distribution and deployment. Running a large Python project as a single file feels like magic – which is great until …
Thumbnail image for Single-file Python/Django Deployments

Single-file Python/Django Deployments

This post covers portions of my talk, Containerless Django, from DjangoCon US 2018. Deploying Python has improved significantly since I started working with it over a decade ago. We have virtualenv, pip, wheels, package hash verification, and lock files. Despite …
Thumbnail image for Cracking Django Password Hashes

Cracking Django Password Hashes

Most of the Django projects I work with take advantage of django.contrib.auth. It manages users and groups and is tightly coupled with django.contrib.admin. In this post, we are going to explore how it resists a potential attacker. The study below …
Thumbnail image for Sandboxing Services with Systemd

Sandboxing Services with Systemd

With Ubuntu 14.04 (Trusty) now a year away from end-of-life, we’ve been planning and performing upgrades for the soon-to-be legacy OS. The biggest change is the move from Upstart to Systemd for managing services. It’s trivial to convert a service …
Thumbnail image for Logging to Systemd's Journal in Python

Logging to Systemd's Journal in Python

I’ll be the first to admit that I was skeptical about Systemd and its companion log aggregator Journald, but after working with if for a few months, I’ve seen the light (or drunk the Kool Aid… not sure). Typically I …
Thumbnail image for Goodbye manage.py

Goodbye manage.py

Every Django project starts with a manage.py file in its root. It’s a convenience script that allows you to run administrative tasks like Django’s included django-admin. In our last post, we discussed the merits of including a setup.py file in …
Thumbnail image for Using setup.py in Your (Django) Project

Using setup.py in Your (Django) Project

A client recently asked me why all the Django projects we create have a setup.py in the root of the project. Lots of projects get by just fine without one, so why do I use it? The explanation turned out …