Created
August 11, 2021 16:45
-
-
Save benwalio/8598cf9f642271ffdaf3daa82c1802cb to your computer and use it in GitHub Desktop.
create a basic uuid using jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- set ns = namespace(uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx') %} | |
{%- set ns.new_uuid = '' %} | |
{%- for x in ns.uuid %} | |
{%- set ns.new_uuid = [ns.new_uuid,(x | replace('x', [0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f'] | random ))] | join %} | |
{%- endfor %} | |
{{ ns.new_uuid }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much for this!