Skip to content

Python library, used to validate UK postcodes via simple, pure-pythonic algorithms.

Notifications You must be signed in to change notification settings

semolex/ukpostcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Python library, used to validate UK postcodes via simple, pure-pythonic algorithms.

Installation

cd into source directory and run:

python setup.py install

Usage example:

>>> from ukpostcode import validate
>>> validate("EC1A 1BB")  # valid
True
>>> validate("W1A 0AX")  # valid
True
>>> validate("1234 AAA")  # invalid
Traceback (most recent call last):
...
ukpostcode.main.PostCodeValidationError: Postcode part 1234 at position (0, 1) must be an alphabetic character

About

Python library, used to validate UK postcodes via simple, pure-pythonic algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages