stevenloria.com

All articles

  1. Recent Releases

    Some notes on some recent releases:

    TextBlob 0.11.0

    Changelog

    This mainly fixes compatibility with NLTK 3.1 and above. Older versions of NLTK are no longer supported. As an added bonus, the averaged perceptron tagger described in this post is now the default part-of-speech tagger in both NLTK …

  2. Marshmallow 2.0 Released

    One alpha, five betas, and two release candidates after marshmallow's last 1.x release, marshmallow 2.0 is published to the PyPI.

    What is marshmallow?

    Marshmallow is a Python library for

    1. Validating input data against a schema,
    2. Deserializing data to application objects (e.g. ORM objects), and
    3. Serializing application objects …
  3. Three Command-line Tools for Productive Python Development

    Below are three tools that I started using recently that I have since found indispensable when developing with Python.

    I. Bootstrap your project with cookiecutter

    I am a big fan of project templates. They enable you to reuse best practices and patterns whenever you start a new project.

    Audrey Roy's …

  4. The M's, V's, and C's: Keep 'em light and fluffy

    Edit October 26, 2014: Update code for marshmallow 1.0.

    The MVC design pattern gives us general guidelines on where various components of an application should go. Web frameworks attempt to enforce MVC by giving us cookiecutter classes and interfaces for each of the three layers.

    But as an application …

  5. Lazily-evaluated property pattern in Python

    Lazy evaluation is a useful pattern that can improve your code's efficiency in many situations. One example of this is instance attributes that take long to compute:

    This approach may cause initialization to take unnecessarily long, especially when you don't always need to access Person#relatives.

    A better strategy would …

Page 1 / 2 »