class documentation

Identify token versions from a predefined mapping.

The extractor returns the version with a prefix that matches the token.

Parameters
versionsDictionary of token versions to use for extraction.
Method __init__ Undocumented
Method extract Get the token version that has a matching prefix.
Instance Variable versions Dictionary of available token versions.
def __init__(self, versions: dict[str, TokenVersion]): (source)

Undocumented

def extract(self, token: str) -> tuple[TokenVersion, bool]: (source)

Get the token version that has a matching prefix.

Parameters
token:strThe token string to analyze.
Returns
tuple[TokenVersion, bool]The matching TokenVersion and True if recognized, otherwise a default TokenVersion and False.

Dictionary of available token versions.