formatting

3 posts tagged “formatting”.

  1. 2025
  2. Auto-formatting YAML files with yamlfmt

    I decided to see if there was an equivalent of Black or Prettier for YAML files. I found yamlfmt from Google. Update : It turns out Prettier can format YAML too.

    2 min read
  3. Format code examples in documentation with blacken-docs

    I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. I found the blacken-docs tool.

    1 min read
  4. 2023
  5. Formatting thousands in Jinja

    Here's how to format a number in Jinja with commas for thousands, without needing any custom filters or template functions: {{ "{:,}".format(row count) }} Output looks like this: 179,119 Bonus: here's…

    1 min read