postalcodes_ni package

Submodules

postalcodes_ni.exceptions module

exception postalcodes_ni.exceptions.ISOCodeError[source]

Bases: Exception

Thrown when ISO code doesnt exists

exception postalcodes_ni.exceptions.PostalCodeError[source]

Bases: Exception

Thrown when postal code doesnt exists

postalcodes_ni.postalcodes module

postalcodes_ni.postalcodes.get_all_municipalities_by_iso(iso_code: str) → list[source]

Returns all the municipalities for a department based on the ISO code

postalcodes_ni.postalcodes.get_all_municipalities_by_postal(postal_code: int) → list[source]

Returns all the municipalities for a department based on the postal code

postalcodes_ni.postalcodes.get_municipality_by_name(name: str) → tuple[source]

Returns a single record for a municipality based on the name

postalcodes_ni.postalcodes.get_municipality_by_postal(postal_code: int) → dict[source]

Returns a single record for a municipality based on the postal code

Module contents

Top-level package for postalcodes-ni.

postalcodes_ni.get_all_municipalities_by_iso(iso_code: str) → list[source]

Returns all the municipalities for a department based on the ISO code

postalcodes_ni.get_all_municipalities_by_postal(postal_code: int) → list[source]

Returns all the municipalities for a department based on the postal code

postalcodes_ni.get_municipality_by_name(name: str) → tuple[source]

Returns a single record for a municipality based on the name

postalcodes_ni.get_municipality_by_postal(postal_code: int) → dict[source]

Returns a single record for a municipality based on the postal code