-
Migrating a Google App Engine Application to the Python 3 Runtime
Reflections on migrating a large-scale Google App Engine application to Python 3. -
Transforming Code into Beautiful, Idiomatic Python
Notes from Raymond Hettinger's talk, "Transforming Code Into Beautiful, Idiomatic Python" from PyCon US 2013. -
Populating a StructuredProperty using the ndb.Model Constructor
After taking a deep dive into the App Engine SDK for Python, I thought I would share some of my findings on some of the more esoteric features of the ndb.Model class. In particular, how one can populate a StructuredProperty using the ndb.Model constructor. -
Isolating Python Environments with pyenv, virtualenv, and virtualenvwrapper
When working with multiple Python applications, the problem of conflicting dependencies and versions is bound to arise. Imagine you have an application that needs version 1 of a library, but another application requires version 2. How can you use both of these applications at the same time? When the Python environment is shared, it is easy to end up in a situation where upgrading the dependencies of one application, invalidates the dependencies of another. In order to mitigate this problem, is it necessary to isolate Python environments. -
How to Mock the Built-in Function open()
This article provides an example for mocking the Python built-in function open() using the mock library. -
How to Test a Function That Raises an Exception
This article demonstrates how to create a unit test for a Python function that raises an exception.