Closed nuno-andre closed 3 years ago
Hi @nuno-andre,
Thanks for providing the number format. I've merged it as 36d723c. I took out the segment()
function for now because it was slightly easier to switch to a regex than to turn it into something that also works for Python 2.7 (only recently support for Python 2.6 was dropped).
If there are any formats missing I would welcome pull requests but creating issues with a request for the format is also fine.
In general, python-stdnum is meant to be used in situations like with Pydantic (didn't know about that library before). I recommend calling compact()
on a number before storing it in a database or similar storage because it tries to ensure a consistent for for the number so that it is easier to do queries for the number.
Thanks!
Hi!
This PR adds support for the ISRC (International Standard Recording Code).
I've also added a little function to
util.py
that I often use to split strings into different sizes. I think it could be useful for other codes. If you think that it's misplaced or misnamed I have no problem in modifying the commit.Also, comment that I'm writing a wrapper to use python-stdnum with Pydantic (Pydentic). I have a little library with some validators for Pydantic models, and I've found that yours has almost all of them (and many more), so I think it's way more productive to add the missing ones to python-stdnum and wrap it up. Currently, it is little more than a proof of concept but I will develop it in the next few days, and will also send some more PRs if you like.
Thanks for your work, it's really amazing. I wish I had known about it sooner :)