primitives¶
- polyfactory.value_generators.primitives.create_random_float(random: Random, minimum: Decimal | float | None = None, maximum: Decimal | float | None = None) float [source]¶
Generate a random float given the constraints.
- polyfactory.value_generators.primitives.create_random_integer(random: Random, minimum: int | None = None, maximum: int | None = None) int [source]¶
Generate a random int given the constraints.
- polyfactory.value_generators.primitives.create_random_decimal(random: Random, minimum: Decimal | None = None, maximum: Decimal | None = None) Decimal [source]¶
Generate a random Decimal given the constraints.
- polyfactory.value_generators.primitives.create_random_bytes(random: Random, min_length: int | None = None, max_length: int | None = None, lower_case: bool = False, upper_case: bool = False) bytes [source]¶
Generate a random bytes given the constraints.