Nickolas Kraus

  • About
  • Articles
  • Notes
  • Projects
  • Resume
  • Transcripts
  • Migrating a Google App Engine Application to the Python 3 Runtime

    July 25, 2022
    Reflections on migrating a large-scale Google App Engine application to Python 3.
    programming python google-app-engine
  • Transforming Code into Beautiful, Idiomatic Python

    January 26, 2020
    Notes from Raymond Hettinger's talk, "Transforming Code Into Beautiful, Idiomatic Python" from PyCon US 2013.
    programming python
  • Anonymous Functions in Python

    April 8, 2018
    A brief discussion of lambda functions in Python.
    programming python
  • Populating a StructuredProperty using the ndb.Model Constructor

    April 1, 2018
    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.
    programming python google-app-engine
  • Isolating Python Environments with pyenv, virtualenv, and virtualenvwrapper

    March 25, 2018
    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.
    programming python
  • How to Mock the Built-in Function open()

    March 18, 2018
    This article provides an example for mocking the Python built-in function open() using the mock library.
    programming python
  • How to Test a Function That Raises an Exception

    March 11, 2018
    This article demonstrates how to create a unit test for a Python function that raises an exception.
    programming python