package supports validating and formatting postcodes for the UK
Project description
ideal_ukpostcode
package supports validating and formatting postcodes for the UK
- Free software: MIT license
- Documentation: https://myselfdesai.github.io/ideal_ukpostcode
- PyPI: https://pypi.python.org/pypi/ideal_ukpostcode
Introduction
package supports validating and formatting postcodes for the UK. The details of which postcodes are valid and which are the parts they consist of can be found at wiki
Installation
To install ideal_ukpostcode, run this command in your terminal:
pip install ideal_ukpostcode
This is the preferred method to install ideal_ukpostcode, as it will always install the most recent stable release.
If you don't have pip installed, this Python installation guide can guide you through the process.
From sources
The sources for ideal_ukpostcode can be downloaded from the Github repo.
You can clone the public repository:
git clone git://github.com/myselfdesai/ideal_ukpostcode
Usage
To use ideal_ukpostcode in a project:
validate a postcode
it gives boolean result True or False
import ideal_ukpostcode
ideal_ukpostcode.validate("EC1A 1BB")
format a postcode
format(area, district, sector, unit)
import ideal_ukpostcode
ideal_ukpostcode.format("EC","1A","1","BB")
Test
install dev dependencies
pip install -r requirements_dev.txt
In the root folder, execute :
pytest
Credits
This package was created with Cookiecutter and the giswqs/pypackage project template.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ideal_ukpostcode-1.0.3.tar.gz.
File metadata
- Download URL: ideal_ukpostcode-1.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f965de5e453bd280ab654585bbb454b25575758934bd28ec8ae407d725469c36
|
|
| MD5 |
495e54e57a0c83a10ba07355826f61ad
|
|
| BLAKE2b-256 |
dee522ba7f80080c66e44728367d1bfdb73e94a87ac64dc8caa6a8c7d92f1b18
|
File details
Details for the file ideal_ukpostcode-1.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: ideal_ukpostcode-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e0440c4241afcb12b47b63c774930bc3eab32ad89afb6bb31ead8a6d2b2da66
|
|
| MD5 |
b51e8107a0e92f8795b5942bcd53f252
|
|
| BLAKE2b-256 |
1700689c13cc1bc066264726b5280cbf651427ff2a26924997be6d5cf8cc9b43
|