narupatools.core.random

Core random number generation.

Functions

random_float

Generate a uniform random scalar in a range.

random_integer

Generate a uniform random integer in a range.

random_letter

Generate a random letter from the current locale.

random_word

Generate a random word formed of random letters in a mixture of cases.

narupatools.core.random.random_float(min: float = 0.0, max: float = 1.0)float

Generate a uniform random scalar in a range.

Parameters
  • min – Minimum value (inclusive).

  • max – Maximum value (inclusive).

narupatools.core.random.random_integer(min: int = 0, max: int = 1)int

Generate a uniform random integer in a range.

Parameters
  • min – Minimum value (inclusive).

  • max – Maximum value (inclusive).

narupatools.core.random.random_letter()str

Generate a random letter from the current locale.

narupatools.core.random.random_word(min_length: int = 1, max_length: int = 10)str

Generate a random word formed of random letters in a mixture of cases.

Parameters
  • min_length – Minimum number of characters.

  • max_length – Maximum number of characters.