Skip to content

Random String

formatting...

Generate a specified number of unique strings, based on a string format pattern.

The list is pre-populated to ensure that each string is unique.

Format

Initial value is a string pattern specified with %s and %d, or %g.

  • %s represents one ASCII letter
  • %d represents one digit between 0 and 9
  • %g represents one complete UUID(4), cannot be combined with other string patterns

Parts of the string can be static, e.g. not random.

Arguments

Name Type Description Default
count int number of unique strings to generate 1
upper bool if the strings should be in upper case False

Example

And value for variable "AtomicRandomString.registration_plate_number" is "%s%sZ%d%d0 | upper=True, count=100"
And value for variable "AtomicRandomString.uuid" is "%g | count=100"

This can then be used in a template:

{
    "registration_plate_number": "{{ AtomicRandomString.registration_plate_number }}"
}

AtomicRandomString.registration_plate_number will then be a string in the format [A-Z][A-Z]Z[0-9][0-9]0 and there will be 100 unique values for disposal.