Random String
The random_string function generates a random string of letters, numbers, or special characters.
Introduced in FalconPy v1.5.1.
Keyword arguments
Section titled “Keyword arguments”| Keyword | Data type | Default | Allowed values |
|---|---|---|---|
length | Integer | 10 | Any (performance impacted by very long strings) |
include_letters | Boolean | True | True or False |
include_digits | Boolean | True | True or False |
include_specials | Boolean | False | True or False |
Default (10 characters, mixed-case letters and numbers):
from falconpy import random_string
result = random_string()print(result)lqp7iGsob0Custom length:
from falconpy import random_string
result = random_string(length=25)print(result)LOtxDgHV9z0OblG1wOykSFgLmNumbers only:
from falconpy import random_string
result = random_string(include_letters=False)6759739861With special characters:
from falconpy import random_string
result = random_string(length=25, include_specials=True)0h&OLSUofllhtUwbZdwu@BymF