pyrtma.core_defs.IntArray

class IntArray(validator, len)[source]

Bases: ArrayField[_IV], Generic[_IV]

IntArray validator class

IntArray validator class

Parameters:
  • validator (Type[IV]) – Field validator class for Int type

  • len (int) – Field length

Methods

count

index

Raises ValueError if the value is not present.

validate_array

Validate array

validate_many

Validate multiple values

validate_one

Validate one value

count(value) integer -- return number of occurrences of value
index(value[, start[, stop]]) integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

validate_array(value)

Validate array

Parameters:

value (ArrayField) – Array value to validate

Raises:

TypeError – Wrong type

validate_many(value)

Validate multiple values

Parameters:

value – Values to validate

validate_one(value)

Validate one value

Parameters:

value – Value to validate