Skip to main content

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.

Source Distribution

postcode_validator-0.0.4.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

postcode_validator-0.0.4-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page