postalcodes-ni

Python package for handle Nicaragua postal codes

made-with-python made-with-python PyPI version Travis-ci GitHub version Documentation Status

Quickstart

Install postalcodes-ni:

$ pip install postalcodes-ni

Then use it in your project:

from postalcodes_ni import (
    get_department_by_iso, get_department_by_postal,
    get_municipality_by_name, get_municipality_by_postal
)

This package uses data from those websites:

Usage

postalcodes_ni exposes the following methods:

  • get_department_by_iso for get all the municipalities in a department using the ISO code - Ex MN for Managua department.
  • get_department_by_postal for get all the municipalities in a department using the postal code - Ex 10000 for Managua department.
  • get_municipality_by_name for get an expecific municipality using his name - Ex Altagracia for the Rivas department.
  • get_municipality_by_postal for get an expecific municipality using his postal code - Ex 48800 for the municipality of Altagracia from Rivas department.

Running Tests

Does the code actually work?

$ source env/bin/activate
(env) $ pip install -r requirements_dev.txt
(env) $ make test-all