Welcome to UK Postal Code and Validation’s documentation!

Quickstart Usage:

INSTALL:

pip3 install https://github.com/jquiterio/ukpc.git

or unzip https://github.com/jquiterio/ukpc/archive/master.zip

if unziped:

cd /path/to/unziped/foleder/
python3
>>>import ukpostalcode

VALIDATION:

ukpostalcode.isvalid("OX1 2JD")

>>>True

FORMAT:

ukpostalcode.format_postalcode("OX12JD")

>>>'OX1 2JD'

or:

ukpostalcode.format_postalcode("O X 12J D")

>>>'OX1 2JD'