Skip to main content

ideal_ukpostcode

image

package supports validating and formatting postcodes for the UK

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.

Metadata

Release files for ideal-ukpostcode 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ideal-ukpostcode 1.0.3
File Size Uploaded
ideal_ukpostcode-1.0.3.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ideal-ukpostcode 1.0.3
File Interpreter ABI Platform
ideal_ukpostcode-1.0.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.6 kB

Release files / ideal_ukpostcode-1.0.3.tar.gz

Download URL ideal_ukpostcode-1.0.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f965de5e453bd280ab654585bbb454b25575758934bd28ec8ae407d725469c36
BLAKE2b-256 checksum
How to use checksums
dee522ba7f80080c66e44728367d1bfdb73e94a87ac64dc8caa6a8c7d92f1b18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / ideal_ukpostcode-1.0.3-py2.py3-none-any.whl

Download URL ideal_ukpostcode-1.0.3-py2.py3-none-any.whl
Size 5.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5e0440c4241afcb12b47b63c774930bc3eab32ad89afb6bb31ead8a6d2b2da66
BLAKE2b-256 checksum
How to use checksums
1700689c13cc1bc066264726b5280cbf651427ff2a26924997be6d5cf8cc9b43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page