Announcing fluent-codegen

Posted in:

This post announces fluent-codegen, a Python library for generating Python code. Not everyone needs this, but when you need it, you’ll probably know, and you’ll want probably want a decent solution that is not based on string concatenation.

The history of this project is that it started out as a codegen module in fluent-compiler, which is an implementation of Project Fluent, Mozilla’s internationalisation solution. So the word “fluent” referred to that originally, but now it refers to a set of nice APIs for building up Python expressions.

As I needed a code generation library for another purpose, I pulled out this library and fleshed it out into a relatively complete, standalone project. It has also evolved quite a bit since its earlier form, and is a pretty well rounded library now. You can check out the nice docs, which include a nice little toy example of a “SVG to Python Turtle” compiler. Enjoy!

This is my personal blog, and does not necessarily reflect the opinions of my clients/employer or my church.

Comments §

Comments should load when you scroll to here...