Python

2017


Digging Into Django QuerySets

Jeff Bradberry

Digging Into Django QuerySets

Object-relational mappers (or ORMs for short), such as the one that comes built-in with Django, make it easy for even new developers to become productive without needing to have a large body of knowledge about how to make use of relational databases. They abstract away the details of database access, replacing tables with declarative model classes and queries with chains of method calls. Since this is all done in standard Python developers can build on top of it further, adding instance methods to a model to wrap reusable pieces of logic. However, the abstraction provided by ORMs is not perfect. There are pitfalls lurking for unwary developers, such as the N + 1 problem. On the bright side, it is not difficult to explore and gain a better understanding of Django's ORM. Taking the time and effort to do so will help you become a better Django developer.

cover-come-visit-us-pycon-2017.jpg

Come Visit Us at PyCon 2017

Whitney Hill

PyCon 2017 is fast approaching, and we’re excited to support the event this year as sponsors once again. It’s a great opportunity to meet new friends, exchange ideas and interact with the community at large.

cover-production-ready-dockerfile-your-python-django-app.png

Here's a Production-Ready Dockerfile for Your Python/Django App

Update (October 29, 2019): I updated this post with more recent Django and Postgres versions, to use Python and pip directly in the container (instead of in a separate virtual environment, which was unnecessary), and switched to a non-root user via Docker instead of uWSGI.

cover-python-type-annotations.gif

Python type annotations

Dan Poirier

When it comes to programming, I have a belt and suspenders philosophy. Anything that can help me avoid errors early is worth looking into.

cover-caktus-attends-wagtail-cms-sprint-reykjavik.png

Caktus Attends Wagtail CMS Sprint in Reykjavik

Caktus CEO Tobias McNulty and Sales Engineer David Ray recently had the opportunity to attend a development sprint for the Wagtail Content Management System (CMS) in Reykjavik, Iceland. The two-day software development sprint attracted 15 attendees hailing from a total of 5 countries across North America and Europe.

cover-Caktus-at-pycaribbean.jpg

Caktus at PyCaribbean

Hao Nguyen

For the first time, Caktus will be gold sponsors at PyCaribbean February 18-19th in Bayamon, Puerto Rico. We’re pleased to announce two speakers from our team.

cover-ship-it-day-q1-2017.jpg

Ship It Day Q1 2017

Last Friday, Caktus set aside client projects for our regular quarterly ShipIt Day. From gerrymandered districts to RPython and meetup planning, the team started off 2017 with another great ShipIt.

cover-new-year-new-python-3-6.gif

New year, new Python: Python 3.6

Charlotte Mays

Python 3.6 was released in the tail end of 2016. Read on for a few highlights from this release.

New module: secrets

Python 3.6 introduces a new module in the standard library called secrets. While the random module has long existed to provide us with pseudo-random numbers suitable for applications like modeling and simulation, these were not "cryptographically random" and not suitable for use in cryptography. secrets fills this gap, providing a cryptographically strong method to, for instance, create a new, random password or a secure token.

2016


cover-django-boring-or-why-tech-startups-should-use-django.gif

Django is Boring, or Why Tech Startups (Should) Use Django

I recently attended Django Under The Hood in Amsterdam, an annual gathering of Django core team members and developers from around the world. A common theme discussed at the conference this year is that “Django is boring.” While it’s not the first time this has been discussed, it still struck me as odd. Upon further reflection, however, I see Django’s “boringness” as a huge asset to the community and potential adopters of the framework.

cover-django-under-hood-2016-recap.png

Django Under the Hood 2016 Recap

Hao Nguyen

Caktus was a proud sponsor of Django Under the Hood (DUTH) 2016 in Amsterdam this year. Organized by Django core developers and community members, DUTH is a highly technical conference that delves deep into Django.