MyNumber (Japanese common number of social security and tax) library
Project description
JPMyNumber is Japanese common number of social security and tax (=My Number) library.
JPMyNumber(123456789018)
# this is valid
JPMyNumber(123456789019)
# JPMyNumberCheckDigitError
Installation
$ pip install JPMyNumber
Usage
Validation
from jpmynumber import JPMyNumber
from jpmynumber.exceptions import JPMyNumberLengthError, JPMyNumberCheckDigitError
try:
JPMyNumber(123456789018)
except JPMyNumberLengthError:
print('length error')
except JPMyNumberCheckDigitError:
print('check digit error')
Creation
from jpmynumber import JPMyNumber
JPMyNumber.random_create()
# <jpmynumber.core.JPMyNumber(123456789018)>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
JPMyNumber-0.0.5.tar.gz
(2.1 kB
view hashes)