Skip to content

Types

sereto.types

TypeCategories = set[Annotated[str, StringConstraints(pattern='^[a-zA-Z0-9._-]{1,20}$', strict=True)]] module-attribute

Type for categories names.

The values should meet the following requirements:

  • It can only contain letters (a-zA-Z), numbers (0-9), underscore (_), dash (-), and dot (.).
  • It should be between 1 and 20 characters long.
Example

You can provide values such as dast, sast (or DAST, SAST), etc.

TypeNonce12B = Annotated[SecretBytes, Len(12, 12), Strict(), AfterValidator(zero_bytes)] module-attribute

Type for a 12 byte long nonce.

Using SecretBytes prevents the nonce from being printed in logs or tracebacks.

The value must contain at least one non-zero byte. This check is in place to prevent unintentional errors.

TypePassword = Annotated[SecretStr, Strict(), Len(8, 100)] module-attribute

Type for password.

Using SecretStr prevents the password from being printed in logs or tracebacks.

The value should meet the following requirements:

  • It should be between 8 and 100 characters long.

TypePathName = Annotated[str, StringConstraints(pattern='^[a-zA-Z0-9._-]{1,100}$', strict=True)] module-attribute

Type for path name.

The value should meet the following requirements:

  • It can only contain letters (a-zA-Z), numbers (0-9), underscore (_), dash (-), and dot (.).
  • It should be between 1 and 100 characters long.

TypeProjectId = Annotated[str, StringConstraints(pattern='^[a-zA-Z0-9._-]{1,20}$', strict=True)] module-attribute

Type for project ID.

The value should meet the following requirements:

  • It can only contain letters (a-zA-Z), numbers (0-9), underscore (_), dash (-), and dot (.).
  • It should be between 1 and 20 characters long.

TypeSalt16B = Annotated[SecretBytes, Len(16, 16), Strict(), AfterValidator(zero_bytes)] module-attribute

Type for a 16 byte long salt.

Using SecretBytes prevents the salt from being printed in logs or tracebacks.

The value must contain at least one non-zero byte. This check is in place to prevent unintentional errors.