{"id":19332592,"url":"https://github.com/oscarmcm/postalcodes-ni","last_synced_at":"2025-07-03T19:07:49.481Z","repository":{"id":62354915,"uuid":"178035977","full_name":"oscarmcm/postalcodes-ni","owner":"oscarmcm","description":"Python package for handle Nicaragua postal codes","archived":false,"fork":false,"pushed_at":"2019-03-28T16:55:09.000Z","size":45,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T04:40:36.372Z","etag":null,"topics":["nicaragua","package","postal-codes","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/postalcodes-ni/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oscarmcm.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T16:43:02.000Z","updated_at":"2023-03-10T10:05:07.000Z","dependencies_parsed_at":"2022-10-31T10:48:09.435Z","dependency_job_id":null,"html_url":"https://github.com/oscarmcm/postalcodes-ni","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/oscarmcm/postalcodes-ni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fpostalcodes-ni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fpostalcodes-ni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fpostalcodes-ni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fpostalcodes-ni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscarmcm","download_url":"https://codeload.github.com/oscarmcm/postalcodes-ni/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscarmcm%2Fpostalcodes-ni/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263385761,"owners_count":23458745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nicaragua","package","postal-codes","python"],"created_at":"2024-11-10T02:46:47.044Z","updated_at":"2025-07-03T19:07:49.454Z","avatar_url":"https://github.com/oscarmcm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\npostalcodes-ni\n==============\n\nPython package for handle Nicaragua postal codes\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![made-with-python](https://img.shields.io/pypi/pyversions/postalcodes_ni.svg)](https://pypi.org/project/postalcodes_ni/)\n[![PyPI version](https://badge.fury.io/py/postalcodes-ni.svg)](https://badge.fury.io/py/postalcodes-ni)\n[![Travis-ci](https://travis-ci.org/oscarmcm/postalcodes-ni.png?branch=master)](https://travis-ci.org/oscarmcm/postalcodes-ni)\n[![GitHub version](https://badge.fury.io/gh/oscarmcm%2Fpostalcodes-ni.svg)](https://badge.fury.io/gh/oscarmcm%2Fpostalcodes-ni)\n[![Documentation Status](https://readthedocs.org/projects/postalcodes-ni/badge/?version=latest)](http://postalcodes-ni.readthedocs.io/?badge=latest)\n\nQuickstart\n----------\nInstall `postalcodes-ni`:\n\n    $ pip install postalcodes-ni\n\nThen use it in your project:\n\n```python\nfrom postalcodes_ni import (\n    get_all_municipalities_by_iso, get_all_municipalities_by_postal,\n    get_municipality_by_name, get_municipality_by_postal\n)\n```\n\nYou can find the documentation in [https://postalcodes-ni.readthedocs.io](https://postalcodes-ni.readthedocs.io/en/latest/)\n\nThis package uses data from those websites:\n\n- [ISO 3166-2:NI](https://es.wikipedia.org/wiki/ISO_3166-2:NI)\n- [Postal Codes](https://es.wikipedia.org/wiki/Anexo:C%C3%B3digos_postales_de_Nicaragua)\n\nUsage\n--------------\n\n`postalcodes_ni` exposes the following methods:\n\n- `get_all_municipalities_by_iso` for get all the municipalities in a department using the ISO code - Ex **MN** for **Managua** department.\n- `get_all_municipalities_by_postal` for get all the municipalities in a department using the postal code - Ex **10000** for **Managua** department.\n- `get_municipality_by_name` for get an specific municipality using his name - Ex **Altagracia** for the **Rivas** department.\n- `get_municipality_by_postal` for get an specific municipality using his postal code - Ex **48800** for the municipality of **Altagracia** from **Rivas** department.\n\nExample\n--------------\n\nFirst, you need import the methods that you want to use\n\n```python\nfrom postalcodes_ni import (\n    get_all_municipalities_by_iso, get_all_municipalities_by_postal,\n    get_municipality_by_name, get_municipality_by_postal\n)\n```\n\nFor get all the municipalities in a department use the following methods\n\n```python\n\u003e\u003e\u003e # Get all the municipalities in Carazo department using iso code\n\u003e\u003e\u003e get_all_municipalities_by_iso('CA')\n[('Jinotepe', 45000), ('Dolores', 46100), ('El Rosario', 46200), ...]\n\n\u003e\u003e\u003e # Get all the municipalities in Carazo department using postal code\n\u003e\u003e\u003e get_all_municipalities_by_postal(45000)\n[('Jinotepe', 45000), ('Dolores', 46100), ('El Rosario', 46200), ...]\n```\n\nFor get an specific municipality in a department use the following methods\n\n```python\n\u003e\u003e\u003e # Get a municipality using his name\n\u003e\u003e\u003e get_municipality_by_name('nindiri')\n('Nindirí', 42200)\n\n\u003e\u003e\u003e # Get a municipality using his postal code\n\u003e\u003e\u003e get_municipality_by_postal(42500)\n('Catarina', 42500)\n```\n\nRunning Tests\n--------------\n\nDoes the code actually work?\n\n    $ source env/bin/activate\n    (env) $ pip install -r requirements_dev.txt\n    (env) $ make test-all\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmcm%2Fpostalcodes-ni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscarmcm%2Fpostalcodes-ni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmcm%2Fpostalcodes-ni/lists"}