Determines large parts of a Mexican postal address from its postal code (C.P.).
Project description
Postal Codes Mexico
Postal codes Mexico determines large parts of an address from its postal code (C.P.).
Free software: MIT license
Documentation: https://postalcodes-mexico.readthedocs.io.
Usage
The method places returns a list of named tuples with all places that share the postal code.
>>> from postalcodes_mexico import places >>> places('01000') [('01000', 'San Ángel', 'Colonia', 'Ciudad de México', 'Álvaro Obregón', 'Ciudad de México')] >>> my_places = places('01030') >>> len(my_places) 2 >>> my_places[0] ('01030', 'Axotla', 'Pueblo', 'Ciudad de México', 'Álvaro Obregón', 'Ciudad de México') >>> my_places[1] ('01030', 'Florida', 'Colonia', 'Ciudad de México', 'Álvaro Obregón', 'Ciudad de México') >>> for place in my_places: ... print(place[0], place[1], place[3]) ... 01030 Axotla Ciudad de México 01030 Florida Ciudad de México >>> my_place = places('01000')[0] >>> my_place.postal_code 01000 >>> my_place.city Ciudad de Méxic >>> my_place.place_type Colonia
Reference
The data used in this package comes from the official website of the Mexican Postal Service (Correos Mexico). On the download page of the catalogue of postal codes it is stated that this data is not to be commercialized:
El Catálogo Nacional de Códigos Postales, es elaborado por el Servicio Postal Mexicano y se proporciona en forma gratuita, no estando permitida su comercialización, total o parcial.
http://www.correosdemexico.gob.mx/lservicios/servicios/CodigoPostal_Exportar.aspx
Roadmap
Ideas for the future development can be found among the project’s GitHub issues.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.1 (2017-04-06)
Metadata fixes
0.1.0 (2017-04-06)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.