Download the PHP package eclipxe/sepomexphp without Composer

On this page you can find all versions of the php package eclipxe/sepomexphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sepomexphp

eclipxe\sepomexphp - Servicio Postal Mexicano PHP Library

Source Packagist PHP Version Support Latest Version Software License Build Status Reliability Maintainability Code Coverage Violations Total Downloads

This library is an unofficial version for the Mexican SEPOMEX data.

Some parts of the project are in Spanish since the main consumers of this library are mexicans. Anyhow, all the database, code and other information is in english.

Installation

Install using composer, no other methods are recommended!

Usage

Using a Sqlite3 database file created by the library:

Using your own PDO connection:

Also, check the zipcode-info.php script. And ZipCodeDataTest.php test.

If you only want to download the source file from SEPOMEX, check script file scripts/download.php.

It is possible to use your own downloader, just implement the interface DownloaderInterface.

The project provides the following implementations:

If you want to import the source file from SEPOMEX into your own SQLite3 database, check create-sqlite-from-raw.php.

Do you have your own dataset of Sepomex? Then you can extend this library, just create DataGatewayInterface that implements the methods and get the data from anywhere.

About the SEPOMEX information (as of 2018-02-02)

Sepomex distribute its database of postal codes with a very restrictive clause on its first line:

El Catálogo Nacional de Códigos Postales, es elaborado por Correos de México y se proporciona en forma gratuita para uso particular, no estando permitida su comercialización, total o parcial, ni su distribución a terceros bajo ningún concepto.

That means:

Anyhow, the data source has been released in https://datos.gob.mx/busca/dataset/catalogo-nacional-de-codigos-postales/resource/2c5c36de-ffed-4dc6-9beb-66369db3a622 by the Mexican government using a libre license called LIBRE USO MX, and it removes any restrictions from the disclaimer.

If you run the script scripts/create-sqlite-from-raw.php you will create a sqlite database with the same information but normalized, the script will download the source if it does not exist.

You would find more information about the source raw file inside docs/DATABASE.md (spanish)

What is working

Right now you can search a mexican zip code, and it will give you the information about:

The city is located under the location entity because the same zip code can include some places inside the city and also some places outside the city. Yes, this is how it works in Mexico.

Contributing

Contributions are welcome! Please read CONTRIBUTING for details and don't forget to take a look the TODO and CHANGELOG files.

License

The eclipxe\sepomexphp library is copyright © Carlos C Soto and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

Data source

"Tabla de Códigos Postales y asentamientos humanos" published by "Correos de México". Getting from:


All versions of sepomexphp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-pdo Version *
ext-iconv Version *
ext-zip Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package eclipxe/sepomexphp contains the following files

Loading the files please wait ....