class documentation

Abstract base class for extracting token version from a token string.

Subclasses must implement the extract method to identify the token format and return the corresponding TokenVersion along with recognition status.

Method extract Extract the token version from a token string.
@abstractmethod
def extract(self, token: str) -> tuple[TokenVersion, bool]: (source) ΒΆ

Extract the token version from a token string.

Parameters
token:strThe token string to analyze.
Returns
tuple[TokenVersion, bool]A tuple containing the TokenVersion and a boolean indicating whether the token was recognized.