Postcode Validator Library
Project description
A Postcode Validator Library.
The initial releas includes validation for only UK Postcodes
Install
postcode-validator is available on PyPI:
$ pip install postcode-validator
Usage
from postcode-validator.uk.uk_postcode_validator import UKPostcode
postcode = UKPostcode('w1a0ax')
postcode.postcode
# output
'W1A 0AX'
postcode.outward
# output
'W1A'
postcode.inward
# output
'0AX'
postcode.area
# output
'W'
postcode.district
# output
'1A'
postcode.sector
# output
'0'
postcode.unit
# output
'AX'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.