Inside the Head of PyDanny

Hi, I'm Daniel Roy Greenfeld, and welcome to my blog. I write about Python, Django, and much more.

Tag: Python3

Using Python and Google Docs to Build Books

Python F-Strings Are Fun!

When I started my latest fiction book, The Darkest Autumn, I wrote out the chapters as individual files. I did it in a text editor (Sublime) and saved the files to a git repo. The names of the files determined their order, chapters being named in this pattern:

the-darkest-autumn $ tree ...

Read more ...

Python F-Strings Are Fun!

Python F-Strings Are Fun!

In python 3.6 we saw the adoption of Literal String Interpolation, or as they are known more commonly, f-strings. At first I was hesitant because... well... we've got multiple string tools already available:

one, two = 1, 2
_format = '{},{}'.format(one, two)
_percent = '%s,%s' ...

Read more ...

How To Create Installable, Reusable Django Packages



: Django Package Ecosystem: cookiecutter-djangopackage


: center


: Django Package Ecosystem: cookiecutter-djangopackage



What I mean by an \"installable Django package\": a reusable component that can be shared across Django projects, allowing us to combine our own efforts with others. Some examples include:

Read more ...

Python Decorator Cheatsheet

I can never remember the syntax for writing decorators. I always have to look it up. Worse, I always have to remember where to look to find references. Hence the reason for this article. I'll never lose this reference: It's on my laptop and the internet.

Each type ...

Read more ...

Building Conda Packages for Multiple Operating Systems

On the Cookiecutter project, recently we added conda to the open source packaging systems we officially support (You can find Cookiecutter on PyPI, homebrew, and apparently some Linux distros).

Creating a conda recipe from a PyPI package


Read more ...

Cookiecutter: Project Templates Made Easy

Yesterday, Jeff Knupp wrote an amazing how-to article called \"Open Sourcing a Python Project the Right Way\". While I was reading it, I was rather pleased by just how close it is to my own practices. Considering Jeff's amazing Writing Idiomatic Python, it meant I was on the right ...

Read more ...

My experiences with Django and Python 3

The following are my notes, observations, and resources on the subject of working with Python 3 (with or without Django).

Recently I've become involved in a couple of Django efforts that used Python 3.3. The quick summary of what I learned is pretty much what I expected: Out ...

Read more ...

Content Copyright © 2012-2018 Daniel Greenfeld. Proudly harnessed by Mountain, powered by Flask, and rendered by Frozen Flask, all of which take great advantage of Python.