https://github.com/eddmash/ukpostcodevalidator
Validates UK post code
https://github.com/eddmash/ukpostcodevalidator
format postal-code python uk validation
Last synced: about 1 year ago
JSON representation
Validates UK post code
- Host: GitHub
- URL: https://github.com/eddmash/ukpostcodevalidator
- Owner: eddmash
- License: mit
- Created: 2017-03-24T14:06:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-25T07:20:31.000Z (about 9 years ago)
- Last Synced: 2025-03-07T16:02:58.837Z (about 1 year ago)
- Topics: format, postal-code, python, uk, validation
- Language: Python
- Homepage: http://ukpostcodevalidator.readthedocs.io
- Size: 414 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://ukpostcodevalidator.readthedocs.io/en/latest/?badge=latest)
[](https://travis-ci.org/eddmash/ukpostcodevalidator)
This library validates the uk postal code based on the formating rules found on this article
Documentation can be found here
Installation
------------
You can install `ukpostcodevalidator` using pip:
pip install ukpostcodevalidator
Usage
-----
To validate the postal code for UK just invole the validate method on the Uk class as show below:
>>> from ukpostcodevalidator import validator
>>> validator.Uk.validate("AA9A 9AA")
Running Tests
-------------
To run tests for the project run the following command while inside the root directory ukpostcodevalidator
py.test tests.py