Open KevOrr opened 6 years ago
That is exactly what https://arthurdejong.org/python-stdnum/check/ does. How this is done can be found here: https://github.com/arthurdejong/python-stdnum/blob/master/online_check/stdnum.wsgi#L100
It does use the internal get_number_modules()
function from stdnum.util
(and a few others) which is not really part of the public API but if there is enough interest I can make expose some parts via the public API but also see #73 about some broader discussion about enumerating number modules in python-stdnum.
Suppose that we are given a random number and don't know the format. It would be nice if we could try every
validate()
function in turn, to provide heuristics for what kind of number we're looking at.