Python

2014


Celery in Production

Dan Poirier

(Thanks to Mark Lavin for significant contributions to this post.)

In a previous post, we introduced using Celery to schedule tasks.

In this post, we address things you might need to consider when planning how to deploy Celery in production.

cover-PyOhio-Recap-Celery-with-Python.png

PyOhio Recap: Celery with Python

Hao Nguyen

Caleb Smith recently gave a talk, “Intro to Celery,” at PyOhio (video below). Celery is a pretty popular topic for us here at Caktus. We use it often in our client work and find it very handy. So we were happy Caleb was out in the world, promoting its use. We sat down with him to hear more about PyOhio and Celery.

cover-django-python-website-redesign-pycon-2015.jpg

Website Redesign for PyCon 2015

Hao Nguyen

PyCon 2015’s website launched today (a day early!). PyCon is the premiere conference for the Python community and one we look forward to attending every year. We’re honored that the Python Software Foundation returned to us this year to revamp the site. We were especially happy to work again with organizer-extraordinaires Ewa Jodlowska and Diana Clarke.

July 2014 ShipIt Day Recap

Alex Lemann

This past Friday we celebrated another ShipIt day at Caktus. There was a lot of open source contribution, exploring, and learning happening in the office. The projects ranged from native mobile Firefox OS apps, to development on our automated server provisioning templates via Salt, to front-end apps aimed at using web technology to create interfaces where composing new music or performing Frozen’s Let It Go is so easy anyone can do it.

Caleb and Rebecca at this Month’s Girl Develop It Intro to Python Class

Alex Lemann

One of Caktus’ most pedagogically focused developers, Caleb Smith, will be teaching a class to a group of local budding Pythonistas tomorrow, Saturday 26th, and Caktus’ Rebecca Lovewell will be contributing as a teaching assistant. You can read more about it, and sign up via the meetup page for the event. The class is run by the local chapter of Girl Develop It, a group focused on improving the landscape of women in tech via women focused (but not exclusive) educational opportunities.

cover-caktus-completes-rapidsms-community-coordinator-development-unicef.png

Caktus Completes RapidSMS Community Coordinator Development for UNICEF

Alex Lemann

Colin Copeland, Managing Member at Caktus, has wrapped up work, supported by UNICEF, as the Community Coordinator for the open source RapidSMS project. RapidSMS is a text messaging application development library built on top of the Django web framework. It creates a SMS provider agnostic way of sending and receiving text messages. RapidSMS has been used widely in the mobile health field, in particular in areas where internet access cannot be taken for granted and cell phones are the best communication tool available. This has included projects initiated by UNICEF country offices in Ethiopia, Madagascar, Malawi, Rwanda, Uganda, Zambia, and Zimbabwe.

Managing Events with Explicit Time Zones

Dan Poirier

Managing Events with Explicit Time Zones

Recently we wanted a way to let users create real-life events which could occur in any time zone that the user desired. By default, Django interprets any date/time that the user enters as being in the user’s time zone, but it never displays that time zone, and it converts the time zone to UTC before storing it, so there is no record of what time zone the user initially chose. This is fine for most purposes, but if you want to specifically give the user the ability to choose different time zones for different events, this won’t work.

2013


Using strace to Debug Stuck Celery Tasks

Celery is a great tool for background task processing in Django. We use it in a lot of the custom web apps we build at Caktus, and it's quickly becoming the standard for all variety of task scheduling work loads, from simple to highly complex.

Central logging in Django with Graylog2 and graypy

Django's logging configuration facilities, which arrived in version 1.3, have greatly eased (and standardized) the process of configuring logging for Django projects. When building complex and interactive web applications at Caktus, we've found that detailed (and properly configured!) logs are key to successful and efficient debugging. Another step in that process — which can be particularly useful in environments where you have multiple web servers — is setting up a centralized logging server to receive all your logs and make them available through an easily accessible web interface. There are a number useful tools to do this, but one we've found that works quite well is Graylog2. Installing and configuring Graylog2 is outside the scope of this post, but there are plenty of tutorials on how to do so accessible through your search engine of choice.

cover-raspberry-io-open-sourced.png

Raspberry IO Open Sourced

Vinod Kurup

Back in March, at PyCon 2013, the PSF provided each attendee with a Raspberry Pi, a tiny credit-card sized computer meant to be paired with the Python programming language. The power and portability of the Raspberry Pi has stimulated an explosion of interest among hobbyists and educators. Their uses seem to be limited only by our collective imagination.