pytest_jsonschema_snapshot.tools.genson_addon.format_detector

Classes

FormatDetector

Class for detecting string formats

Module Contents

class FormatDetector[source]

Class for detecting string formats

EMAIL_PATTERN[source]
UUID_PATTERN[source]
DATE_PATTERN[source]
DATETIME_PATTERN[source]
URI_PATTERN[source]
IPV4_PATTERN[source]
classmethod detect_format(value: str) str | None[source]

Detects the format of a string.

Parameters:

value – The string to analyze

Returns:

The name of the format or None if the format is not defined