class documentation
class DefaultTokenVersionExtractor(TokenVersionExtractor): (source)
Constructor: DefaultTokenVersionExtractor(versions)
Identify token versions from a predefined mapping.
The extractor returns the version with a prefix that matches the token.
| Parameters | |
| versions | Dictionary 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. |
Get the token version that has a matching prefix.
| Parameters | |
token:str | The token string to analyze. |
| Returns | |
tuple[ | The matching TokenVersion and True if recognized, otherwise a default TokenVersion and False. |