Create a Random Bit Set with Jinja

Once in a while, when working with Jinja templating engine, you might need to create a random Bit Set with Jinja. Some might also call it a Binary Flag Set.

Basically, this will be a binary number (for example 10110) where each digit (bit) represents whether something is on/enabled/present or off.

In some systems, this binary number is actually stored as a base 10 integer. So 10110 will be stored as 22.

Continue reading Create a Random Bit Set with Jinja